Howdy, Stranger!

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

Categories

Another newbie question

sadawsonsadawson Member Posts: 4
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.

Thanks

Comments

  • wonagobwonagob Member Posts: 1
    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
  • Shawn CarterShawn Carter Member Posts: 0

    _________ ( http://forcoder.org ) free video tutorials and ebooks about < Swift, C#, Python, PHP, Perl, Go, C++, JavaScript, Assembly, MATLAB, Delphi, Java, C, Visual Basic .NET, Scratch, Objective-C, R, Ruby, Visual Basic, PL/SQL Lisp, Awk, Bash, Clojure, SAS, D, ML, F#, Ada, Crystal, Apex, Transact-SQL, COBOL, Scala, Lua, VBScript, Kotlin, Erlang, Alice, LabVIEW, FoxPro, Dart, ABAP, Logo, Fortran, Prolog, Rust, Scheme, Julia, Hack /> __

Sign In or Register to comment.