VB icon

A simple math enhancer game

Email
Submitted on: 1/1/2015 6:11:00 AM
By: Anonymous (from psc cd)  
Level: Beginner
User Rating: By 10 Users
Compatibility: C++ (general)
Views: 1420
 
     This code is an example of advanced if/else statements using the shell of a math game.
 

INCLUDE files:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
//INCLUDE files for :A simple math enhancer game
//**************************************
#include <iostream.h>
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: A simple math enhancer game
// Description:This code is an example of advanced if/else statements using the shell of a math game.
// By: Anonymous (from psc cd)
//
// Assumes:This is a semi advanced if/else statement program. you should know stuff from before the if/else statements.
//**************************************

#include <iostream.h>
void main( void )
{
	int one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty;
	cout<< " 8 x 8\n";
	cin>> one;
	{
		if ( one == 64 )
			cout<< "Good\n";
	
	else
		cout<< " Sorry\n";
	}
	cout<< " 9 x 4\n";
	cin>> two;
	{
		if ( two == 36 )
			cout<< " Great Job, Keep it up!\n";
	else
		cout<< " Try Harder, bud!\n";
	}
	cout<< " 8 x 5\n ";
	cin>> three;
	{
		if ( three == 40 )
			cout<< " Awsome!\n";
			
	else
		cout<< " Ummmmm...\n";
	}
	cout<< " 9 x 2\n";
	cin>> four;
	{
		if ( four == 18 )
			cout<< "Your gonna be the next Einstein\n";
		else
			cout<< " Who the heck is your teacher!?\n";
	}
	cout<< " 5 x 5\n ";
	cin>> five;
	{
		if ( five == 25 )
			cout<< " There he is, get him!!!\n";
		
		else
			cout<< " No way, who is your teacher!?\n";
	}
	cout<< " 4 x 8\n ";
	cin>> six;
	{
		if ( six == 32 )
			cout<< " Your too good!\n ";
		else
			cout<< " Come on\n ";
	}
	cout<< " 12 x 12 ";
	cin>> seven;
	{
		if ( seven == 144 )
			cout<< " That was really impressive!\n";
		else
			cout<< " Keep Trying!\n";
	}
	cout<< " 6 x 5\n ";
	cin>> eight;
	{
		if ( eight == 30 )
			cout<< " Really Cool!\n";
		else
			cout<< " Sorry\n";
	}
	cout<< " 4 x 4\n ";
	cin>> nine;
	{
		if ( nine == 16 )
			cout<< " Your too much!\n";
			else
			cout<< " C'mon, you can get the next one, I know it!\n";
	}
	cout<< " Last one\n ";
	cout<< " 100 x 100 ";
	cin>> ten;
	{
		if ( ten == 10000 )
			cout<< " OH MY GOSH, HE IS SO INCREADABLY SMART!!!\n";
		else
			cout<< " Sorry man, why dont you try over again?\n";
	}
	cout<< " 11 x 11\n";
	cin>> eleven;
	{
		if ( eleven == 121 )
			cout<< " Super\n";
		else
			cout<< " Nope, Keep Trying\n";
	}
	cout<< " 4 x 7\n ";
	cin>> twelve;
	{
		if ( twelve == 28 )
			cout<< " Wow\n ";
		else
			cout<< " Thats ok, just keep at it\n";
	}
	cout<< " 7 x 7\n ";
	cin>> thirteen;
	{
		if ( thirteen == 49 )
			cout<< " Isn't this fun?\n";
			else
			cout<< " That is what this program is for.\n";
	}
	cout<< " 8 x 7\n";
	cin>> fourteen;
	{
		if ( fourteen == 56 )
			cout<< " Stupendious\n";
		else
			cout<< " Can you feel the disappointment?\n";
	}
	cout<< " 9 x 7\n ";
	cin>> fifteen;
	{
		if ( fifteen == 63 )
			cout<< " Tight\n";
		else
			cout<< " Ok, just keep at it\n";
	}
	cout<< " 5 x 7\n ";
	cin>> sixteen;
	{
		if ( sixteen == 35 )
			cout<< " Bwa ha ha ha, you so cool!\n";
		else
			cout<< " Try a bit harder.\n";
	}
	cout<< " 3 x 9\n ";
	cin>> seventeen;
	{
		if ( seventeen == 27 )
			cout<< " You are almost as good as me~~~\n";
		else
			cout<< " Thats ok\n";
	}
	cout<< " 9 x 6\n ";
	cin>> eighteen;
	{
		if ( eighteen == 54 )
			cout<< " You are better than I thought...\n";
		else
			cout<< " Keep working\n";
	}
	cout<< " 7 x 2\n ";
	cin>> nineteen;
	{
		if ( nineteen == 14 )
			cout<< " You are really good at math\n";
		else
			cout<< " Everyone makes mistakes.\n";
	}
	cout<< " 10 x 10 ";
		cin>> twenty;
	{
		if ( twenty == 100 )
			cout<< " You have earned the rank of Einstein!\n";
		else
			cout<< " Try again and see if you can get to be Einstein...\n";
	}
}


Other 21 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.