No problem. Post back if you don't get it working.
Ok try it but did not work.
Here is my new code
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std;
int main ()
{
srand((unsigned)time(0));
int random_integer1;
int random_integer2;
int input;
const int ANSWER = random_integer1 + random_integer2;
random_integer1 = (rand()%500)+1;
random_integer2 = (rand()%500)+1;
cout << setw (6) << random_integer1 << endl;
cout << "+ ";
cout << setw (4) << random_integer2 << endl;
cout << "------";
cout << "\n";
cin >> input; // get input
while(input != ANSWER);
return 0;
}
I am getting a debug error
ran time check failure #3 the variable 'random_integer1' is being used without being initalized
another error replacing random_integer1 with random_integer2
I can ignore these erros and it will generate the random numbers and allow an answer to be put in but that is it.
Thanks.