//
#include "stdafx.h"
#include
#include '
#include '
#include '
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int mult1, mult2, uprod, prod, ntim;
cout<< "How many problems do you want to solve? "; cin>>ntim;
for(int i=1; i<=ntim; i++) { srand(time(0)); mult1 = rand() % 100 + 1; mult2 = rand() % 100 + 1; cout<< "What is the product of "; cout<<>> uprod;
prod = mult1 * mult2;
if(prod == uprod)
cout<< "Excellent!";
else
cout<< "Wrong!";
cout<< " The product is ";
cout<< prod << endl;
}
system("PAUSE");
}
No comments:
Post a Comment