#include <iostream.h>
#include <conio.h>
#include<Time.h>
#include<stdlib.h>
const int Limit = 9;
void main()
{
int n1, n2, pro = 1, ans = 0 ;
char ch = 'y';
cout << "\n ******* LEARN MULTIPLICATION ********* \n\n ";
while(ch=='y' || ch == 'Y')
{
randomize();
n1 = random(Limit);
randomize();
n2 = random(Limit);
pro = n1 * n2;
while(pro != ans )
{
cout << "\n How much is " << n1 << "times" << n2 << "?" ;
cout << "\n Enter your answer : ";
cin >> ans;
if(pro == ans )
cout << "\n Very Good!!!!";
else
cout<< "No, Please Try again .";
}
pro = 1;
ans = 0;
cout << " Do you continue (Y/N)? ";
cin >> ch;
}
getch();
}
No comments:
Post a Comment