All pastes #490325 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-15 23:25 UTC
rendered paste body
#include <iostream>
using namespace std;
int One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Eleven, Twelve, Thirteen, Forteen, Fifteen, Sixteen, Seventeen, Eighteen, Nineteen, Twenty, passed;
int main()
{
cout << "\nWhat is the answer to question 1?\nAnswer A,B,C,D";
	cin >> One;
	if (One==65 || One==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 2? ";
	if (Two==65 || Two==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
	     passed++ ;
}
    else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 3? ";
	if (Three==65 || Three==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++ ;
}
    else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 4? ";
	if (Four==65 || Four==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++ ;
}
    else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 5? ";
	if (Five==65 || Five==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows

		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 6? ";
	if (Six==65 || Six==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 7? ";
	if (Seven==65 || Seven==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 8? ";
	if (Eight==65 || Eight==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 9? ";
	if (Nine==65 || Nine==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 10? ";
	if (Ten==65 || Ten==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 11? ";
	if (Eleven==65 || Eleven==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 12? ";
	if (Twelve==65 || Twelve==97) // If answer is A then statement will follow
{
  	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 13? ";
	if (Thirteen==65 || Thirteen==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 14? ";
	if (Forteen==65 || Forteen==97) // If answer is A then statement will follow
{
    cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 15? ";
	if (Fifteen==65 || Fifteen==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 16? ";
	if (Sixteen==65 || Sixteen==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 17? ";
	if (Seventeen==65 || Seventeen==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 18? ";
	if (Eighteen==65 || Eighteen==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 19? ";
	if (Nineteen==65 || Nineteen==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";

cout << "\nWhat is the answer to question 20? ";
	if (Twenty==65 || Twenty==97) // If answer is A then statement will follow
{
	cout << "Congratulations right answer" << endl;
		passed++ ;
}
	else // If answer not A statement follows
		cout << "Sorry, wrong answer";
if (passed > 15)
{
	cout << "\nWell done you have passed\nPress any key to exit";
	cin >> One;
}
else
	cout << "\nSorry, you have failed\nPress any key to exit";
	cin >> One;
return 0;
}