Write a program that can be used as a math tutor for a young student. The program should display two random numbers to be added, such as 247 + 129 The program should then pause while the student works on the problem. When the student is ready to check the answer, he/she can press a key and the program will display the correct solution: 247 + 129= 376?

#include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main()
{
int seed,num1,num2,sum,ans;
seed=time(0);   //it helps in generating random number whenever programs runs

srand(seed);

num1=rand()%100;  //generates a random number in 1-100 range

cout << num1 <<endl;

cout<<“+”;

num2=rand()%100;
cout<< num2;
cout<< “\nenter ans:\n”;
cin>>ans;
system(“PAUSE”);  //it causes system to pause for a while
sum=num1+num2;
cout<<“ans:\t”<<sum;
return 0;

 

}