[vba]Код
Sub a()
Dim tm!: tm = Timer
Dim value&, v&, d&, a&, b
Dim q& ' для вывода количества неправильных ответов
Do
value = Int((100 * Rnd) + 1)
v = Int((100 * Rnd) + 1)
b = InputBox("multiply:" & Chr(13) + Chr(13) & value & Chr(13) & v & Chr(13) + Chr(13) & "or type 0 to exit")
If b = 0 Or b = "" Then GoTo goodbye
d = value * v
a = a + 1
If CLng(b) <> d Then q = q + 1
MsgBox ("right:" & " " & d & Chr(13) & "yours:" & " " & b & Chr(13) + Chr(13) & "Total:" & " " & q & "/" & a)
Loop
goodbye:
MsgBox Timer - tm & " s"
MsgBox "Goodbye"
End Sub
[/vba]