#include <iostream.h>
#include <stdlib.h>

main()
{
	srand((unsigned)timer( NULL ));
	int NoOfQuestions=0, answer=0, right=0, wrong=0, c=0, d=0, w, n;
	float score=0, percent=0;
	cout << "Welcome to ARITHMATIKA!\n\n\nPlease enter the number of questions >";
	cin >> NoOfQuestions;
	cout << "\nYou have selected " << NoOfQuestions<< " questions, good luck!\n\n";
	for (;d < NoOfQuestions;d++)
	{
		w =(rand()/1000);
		n =(rand()/1000);
		cout << "Question " << d << ")   What is "<< w<<" x "<<n<<" ?";
		cin >> answer;
		if (answer=(w*n))
		{
			score=score+1;
		}
		else
			score=score-.25;
		
	}
	percent=(score/NoOfQuestions)*100;
	cout << "Score >"<<percent<<"%"<<endl<<endl;
	return(0);
}


