Dim total As Integer Dim rep As String total = 1 rep = InputBox("Veuillez entrer un chiffre") For i = 1 To CInt(rep) total = total * i Next i MsgBox total
Public Function fact(ByVal a As Integer) fact = 1 Do While a <> 1 fact = a * fact a = a - 1 Loop End Function
Dim a as integer a = 5 MsgBox "a = " & a MsgBox "fact(a) = " & fact ( a ) MsgBox "a = " & a
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionif isnumeric(text1.text)then n=CInt(text1.text) Else n=val(text1.text) end if ...