- Public Function premier()
-
- time1 = InputBox("temps", , "10")
-
- time2 = Timer ' temps de dépard
-
- nb = 5
- nb1 = 1
- scor = " 3"
- time3 = time1 + time2 ' temps de fin
-
- line1:
- nb1 = 1
- scor3 = 0
- If time3 < Timer Then GoTo linefin
- nb = nb + 2
- len1 = Len(nb)
- mid1 = Mid(nb, len1, 1)
- If mid1 = 0 Then GoTo line1
- If mid1 = 5 Then GoTo line1
- line2:
- len2 = Len(scor)
- nb1 = nb1 + 1
- If nb1 > len2 Then GoTo line5
- mid2 = Mid(scor, nb1, 1)
- If mid2 = " " Then GoTo line3
- scor3 = scor3 + mid2
- GoTo line2
- line3:
- scor1 = nb / scor3
- scor3 = 0
- scor4 = InStr(1, scor1, ",", vbBinaryCompare) 'recherche si le nombre est decimal
- If scor4 = 0 Then GoTo line1 Else GoTo line2
- line5:
- scor5 = Str(nb)
- scor = scor + scor5
- nb1 = 1
- scor3 = 0
- GoTo line1
- linefin:
- scor = scor + " "
- premier = scor
-
- MsgBox (scor)
-
- End Function
Public Function premier()
time1 = InputBox("temps", , "10")
time2 = Timer ' temps de dépard
nb = 5
nb1 = 1
scor = " 3"
time3 = time1 + time2 ' temps de fin
line1:
nb1 = 1
scor3 = 0
If time3 < Timer Then GoTo linefin
nb = nb + 2
len1 = Len(nb)
mid1 = Mid(nb, len1, 1)
If mid1 = 0 Then GoTo line1
If mid1 = 5 Then GoTo line1
line2:
len2 = Len(scor)
nb1 = nb1 + 1
If nb1 > len2 Then GoTo line5
mid2 = Mid(scor, nb1, 1)
If mid2 = " " Then GoTo line3
scor3 = scor3 + mid2
GoTo line2
line3:
scor1 = nb / scor3
scor3 = 0
scor4 = InStr(1, scor1, ",", vbBinaryCompare) 'recherche si le nombre est decimal
If scor4 = 0 Then GoTo line1 Else GoTo line2
line5:
scor5 = Str(nb)
scor = scor + scor5
nb1 = 1
scor3 = 0
GoTo line1
linefin:
scor = scor + " "
premier = scor
MsgBox (scor)
End Function