my c++ is a little rusty, stupid java!
I don't know what 'calling' is, but you shouldn't need to pass anything.
DO
int a = some random number
int b = some random number
int product = a*b;
int answer = 0;
bool correct = false;
while (!correct)
cout <<"What is "<<a<<" times "<<b<<"?";
cin >> answer;
if (answer == product)
correct = true;
else
correct = false;
if (!correct)
cout<<"Please try again.";
else
cout<<"Good job!";
LOOP
I think I even mixed BASIC in there as well. You should get the idea though. I think you're trying to make this way more difficult than it needs to be.
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Offline 856 posts
since Mar 2004