adding two random numbers..

i need help...this is what i have so far..

Write a program
that can be used as a math tutor for a young student. The program should display
two random numbers that are to be added, such as:
247
+ 129
The program should wait for the student to enter the answer. If the answer is correct,
a message of congratulations should be printed. If the answer is incorrect, a message
should be printed showing the correct answer.

1
2
3
4
5
6
7
unsigned seed = time (0);
    srand(seed);
    
    cout << "add the two numbers together"<<endl;
    cout << rand()<<endl;
     cout << rand()<<endl;
     cin.get();
Last edited on
quite a relevant example here:
http://www.cplusplus.com/reference/cstdlib/rand/

Topic archived. No new replies allowed.