A simple math enhancer game
This code is an example of advanced if/else statements using the shell of a math game.
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
#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";
}
}
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine