Another newbie question

Ok, here is what I have so far and here is what I want to do. I am creating a multiplication tutor program. First I am creating 2 random number variable, random_num1 and randum_num2. I am then asking the question "How much is random_num1 times random_num2 ?". The user then enters their answer. I have a vriable correct_answer which multiplies the 2 random numbers and then compares it to what the user has entered. If correct is displays "Good Job!!! You are right." Else it displays "You are wrong, try again".

First thing I would like to do is for when the user is right a dialog box will pop up saying "You are right" and there will be an ok button. When that button is clicked it will re-start the program with 2 new numbers. If the user is wrong then the dialog box will state "You are wrong, try again" and when the user clicks ok it will clear out or highlight what they have entered so that they can enter a new value.

Perhaps taking it one step further, I would maybe like to create a random multiplication test. It would ask multiplication questions, after the user entered there answer it would do to the next question. The system will need to store each question and answer and whether or not it was wrong or right. After the user has finished all the questions it will display the results.

Any help would be greatly appreciated.



  • Don't know how much help this will (or won't...) be, but....
    I did something like that in my beginners' class recently.

    I used a DO/WHILE loop to make the program repeat.
    For the dialog box, you want to do something like this:

    MessageBox.Show("Good Job", "Correct", MessageBoxButtons.ok)

    That will give you a dialog box stating 'Good Job', heading of 'Correct', and an 'ok' button.

    hope that helps..................d
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion