if it sucks... my excuse is that i am 13 and its my first useful program...
my programs name is shift
here is the code for it:
//This program was made to test your speed in mental math
/* Please Email Me At [email protected]*/
//Beginging The Program:
//Thank You!!!
#include <iostream>
#include <string>
using namespace std;
int main ()
{
//Declaring The Variables:
int add1;
int add2;
int add3;
int sub1;
int sub2;
int sub3;
int mult1;
int mult2;
int mult3;
int div1;
int div2;
int div3;
int frac1;
int frac2;
int frac3;
int age;
int year;
string username;
// Intro to the user | The program starts here:
cout << "|SHIFT MATH TEST, VERSION ONE, EASY LEVEL| Hello user! This program tests your knowledge of math:";
cout << "Adding, Subtracting, Multiplying, Dividing and fractions. ";
cout << " Before we begin your test, I would like to know your: ";
//Personal Information:
cout << "Name?";
cin >> username;
cin.ignore ();
cout << "Your name is " << username <<"\n";
cout << "How old are you?";
cin >> age;
cin.ignore ();
cout << "You are " << age <<"\n";
cout << "Good. One last personal question, what year is it now?";
cin >> year;
cin.ignore ();
cout << "It is the year " << year <<"\n";
//The Test:
cout << "I am now done getting your personal informaion. Now on with the test...";
//Additon-
//Add1
cout << "What is 4+34= ";
cin >> add1;
if ( add1 == 38 ) {
cout << "Good! \n";
}
else if ( add1 != 38 ) {
cout << "\n"; }
//Add2
cout << "What is 44+32= ";
cin >> add2;
if ( add2 == 76 ) {
cout << "Awesome \n";
}
else if ( add2 != 76 ) {
cout << "Good Try, but not the cigar \n"; }
//Add3
cout << "What is 123+234=\n";
cin >> add3;
if ( add3 == 357 ) {
cout << "Well done \n";
}
else if ( add3 != 357 ) {
cout << " Ok...\n"; }
//Sub1
cout << "What is 10-7=\n";
cin >> sub1;
if ( sub1 == 3 ) {
cout << "Right \n";
}
else if ( sub1 != 3 ) {
cout << " Nope \n"; }
//Sub2
cout << "What is 32-12=\n";
cin >> sub2;
if ( sub1 == 20 ) {
cout << "Right \n";
}
else if ( sub2 != 3 ) {
cout << " Nope \n"; }
//Sub3
cout << "What is 103-21=\n";
cin >> sub3;
if ( sub3 == 82 ) {
cout << "Yes \n";
}
else if ( sub3 != 82 ) {
cout << " No \n"; }
//Mult1
cout << "What is 4X3=\n";
cin >> mult1;
if ( mult1 == 12 ) {
cout << "Very good \n";
}
else if ( mult1 != 12 ) {
cout << " Noooooooo\n"; }
//Mult2
cout << "What is 14X3=\n";
cin >> mult2;
if ( mult2 == 42 ) {
cout << "You study, don't you? \n";
}
else if ( mult2 != 42 ) {
cout << " Study More!!! \n"; }
//Mult3
cout << "What is 12X12=\n";
cin >> mult3;
if ( mult3 == 144 ) {
cout << "Yes \n";
}
else if ( mult3 != 144 ) {
cout << " Study More!!! \n"; }
//Div1
cout << "What is 25/5= (Note: / means divided by)\n";
cin >> div1;
if ( div1 == 5 ) {
cout << "You study, don't you? \n";
}
else if ( div1 != 5 ) {
cout << " Study More!!!(\n"; }
//Div2
cout << "What is 27/8= (Note: Use remainders, not decimals Example: 2/11= 5.1; where 5 is the whole number and 1 is the remainder)\n";
cin >> div2;
if ( div2 == 3.3 ) {
cout << "You study, don't you? \n";
}
else if ( div2 != 3.3 ) {
cout << " Study More!!! \n"; }
//Div3
cout << "What is 88/9= (Note: Use remainders, not decimals Example: 2/11= 5 R1)\n";
cin >> div3;
if ( div3 == 9.7 ) {
cout << "I bet your mom is proud of you!!!! \n";
}
else if ( div3 != 9.7 ) {
cout << " What would your mom say? \n"; }
cout << "........................................ You are done. Please go back and count the number of : ) and the number of : ( to figure out your score out of 12. \n";
cout << "This is version one. The next versions will have Fractions, questions using algebra and harder questions.\n";
cout << "If you have any questions upon this programs, Shift... please email [email protected] thank you.";
cout << "User Info:\n";
cout << "Name of User is " << username << "\n";
cout << "Age of User is " << age << "\n";
cout << "Year the test was taken... " << year << "\n";
cout << "SHIFT HAS ENEDED... PLEASE TYPE ' QUIT PLEASE ' to end the program. THANK YOU!!!!! ";
cout << "....Made by Adittya Akash Lee....";
//End
cin.ignore ();
cin.get ();
}
review and rate out of 10.... and tell me how to improve it
note emotions of : ) and : ( is missing because the board doesn't allow me to post that much emotions in my post........
Edited by akashlee, 02 January 2006 - 08:08 PM.