Results 1 to 3 of 3

Thread: Maths Program to test my Kids

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    5

    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 ..

  2. #2
    Addicted Member
    Join Date
    Nov 2000
    Location
    State of Confusion
    Posts
    133
    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

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    5
    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
  •  



Click Here to Expand Forum to Full Width