#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;
}