I’m trying to get make a small minigame for fun and I’m hitting some walls
this is the code
randomize
Dim r1, r2, mult, question, ans
r1 = int(rnd*100) + 1
r2 = int(rnd*100) + 1
mult = " X "
question = r1 & mult & r2
ans = r1*r2
Dim sInput, X
sInput = InputBox(question)
If sInput = ans Then
X=MsgBox ("goodjob")
Else
X=MsgBox ("incorrect")
end if
the problem is
If sInput = ans Then
no matter what I input it always is incorrect
how can I fix this?
New contributor
Robinalex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.