hi, im fairly horrible at c++ programming and we just received a difficult (to me) final project to do...it involves taking random integers, adding them and having the user guess there total..like this:
random number + random number = usersguess

if the guess is wrong they are supposed to guess again...
im not sure how to set this up..any help would be much appreciated..thank you

2. well, you can have a function that generates a rando number. If you want that number to be trully different seed srand to time...if you need more info about this, do a search on the board.

add the two rand numbers, get user input, and compare....based on the comparison result go further.
Code:
```int get_rand()
{
//get random nuber here;
return randNum;
}

int main()
{

int number1 = get_rand();
int number2 = get_rand();
int sum = number1 + number2;
//main prog loop
while( guessing )
{
//get user input compare that to sum using if statement
//if TRUE display it and break out of the loop, if not continue
}
}```
this should get you sarted.....another hint...when you are testing and debugging your program seed rand to a constant value.

3. ## ???

Code:
```/*Ryan Poremba*/
#include <iostream.h>

cout<<"Enter the number for the problem type desired."<<endl;
cout<<"  2. Subtraction"<<endl;
cout<<"  3. Multiplication"<<endl;
cout<<endl;
cout<<"Enter choice: ";
cin>>choice;
if  (choice==1){
int get_rand()
{
for (int i=1; i<=10;i++);
return randNum;
}
int main()
{
int number1 = get_rand();
int number2 = get_rand();
int sum = number1 + number2;
//main prog loop
while( guess==0 )
{
cout<<number1<<"+"<<number2<<"=";
cin<<guess<<endl;
if (guess==sum){
cout<<"CORRECT"<<endl;
correct++;
else
wrong++;
break;
}
}
}

return(0);
}```