'Addition For t = lgmul - Multiple + 1 To 1 Step -Multiple V1 = Mid$(Nb1, t, Multiple) ' A quoi sert le "$" derrière la fonction Mid ? Est-il particulier à VB6 ? V2 = Mid$(Nb2, t, Multiple) R = V1 + V2 + Ret lr = Fix(Log(R + 0.11) / ln10) + 1 If lr Multiple + 1 Then Ret 1 Else Ret = 0 Mid$(Total, t - lr + Multiple, lr) = CStr(R) Next t
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionSub Main() Dim a As Decimal = Val(Console.In.ReadLine()) Dim x As Decimal = 1 For i As UInteger = 1 To 10 ' nombre d'itérations x = x * (2 - a * x) Next i Console.Out.WriteLine("1/" & a & "=" & x) Console.In.ReadLine() End Sub
Sub Main() Dim a As Decimal = 0.52369817 Dim x As Decimal = 1.5 Dim z As UInteger = 16 Dim fin As UInteger = Ceiling(Log(z / x) / Log(2)) + 1 For i As UInteger = 1 To fin x *= (2 - a * x) Next i Console.Out.WriteLine(Mid(x.ToString, 1, z + 2)) Console.In.ReadLine() End Sub