|
-
May 22nd, 2001, 06:21 AM
#1
Thread Starter
New Member
Maths Program to test my Kids
Hi im new to Vb and am trying to develop a program to test my childrens maths...
The functions i want to test is + - x / ,... i also want to add threee levels of difficulty to it ....
I have made it to create 2 random numbers ..then my child enters the answer .. with a resulting pop up box saying correct or incorrect..
I would also like to run a running total of their scores so if they get three wrong out of ten it will say 7/10
I have tried to do this but am copletely stuck , can anyone help me please ?
Any tips or sample code i could look at ?
thanks ..
-
May 22nd, 2001, 01:54 PM
#2
Addicted Member
Just declare a variable under 'General-Declarations' and increment by one each time your kid answers a question right.
Code:
Dim RunningTotal As Integer
Private Sub CheckAnswer()
'Example with Answer representing your kids response,
'and FirstNum and SecondNum representing your random
'numbers
If Answer = FirstNum + SecondNum Then
MsgBox "You're Correct!!"
RunningTotal = RunningTotal + 1
Else
MsgBox "Sorry, you're incorrect."
End If
End Sub
"Don't take life too seriously, you'll never get out alive"
from Van Wilder
-
May 23rd, 2001, 01:35 PM
#3
Thread Starter
New Member
thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|