link of the program for those that want to use
http://www.sendspace.com/file/4mhn8e
heres the source code
Code://Bl4Ck.KiD...'s First Calculater In C++ #include <cstdlib> #include <iostream> using namespace std; int main() { double num;//1st number double num2;//2nd number char choice;//if u dont have cant chose wat u want for (;;){ do { system("title Bl4Ck.KiD...'s Calculater");//Sets title up top of CMD, Took From DeToX Thanks system("color 69");//changes text color, took from DeToX Thanks cout<<"Welcome To Bl4Ck.KiD...'s Calculater\n"; cout<<"Make Sure To Use It Eveytime You Have Math Homework!\n";//prints it at the top cout<<"Choose A Number What You Want To Do, Or Press q To Quit\n";//prints it at the top cout<<"MAKE SURE TO HIT ENTER WHEN YOU SELECT A NUMBER!!!\n";//prints it at the top cout<<"\n";//new line cout<<"1 - Addition\n";//add cout<<"2 - Subtraction\n";//sub cout<<"3 - Division\n";//divid cout<<"4 - Multiplication\n";//multi cout<<"5 - Info\n";//info cin>>choice; } while ( choice < '1' || choice > '5' && choice != 'q');//if u chose 1 th 5 or if u hit q it exits if (choice == 'q') break;//ends program switch (choice) {//switch bewteen choices case '1'://addition case cout<<"\n";//new line cout<<"Enter Your Number You Want To Added, Then Hit Enter\n";//prints text then goes down one with \n cin>>num;//1st number cout<<"\n";//new line cout<<"Enter Another Number To Get Added With It, Then Hit Enter To Get Anwser\n";//prints text then goes down one with \n cin>>num2;//2nd number cout<<"\n";//new line cout<<num + num2;//adds both numbers together cout<<"\n";//new line break;//ends case '2'://subtraction case cout<<"\n";//new line cout<<"Enter Your Number You Want To Be Subtracted, Then Hit Enter\n";//prints text then goes down one with \n cin>>num;//1st number cout<<"\n";//new line cout<<"Enter Another Number To Get Subtracted With It, Then Hit Enter To Get Anwser\n";//prints text then goes down one with \n cin>>num2;//2st number cout<<"\n";//new line cout<<num - num2;//substracts both numbers cout<<"\n";//new line break;//ends case '3'://divid case 3 cout<<"\n";//new line cout<<"Enter Your Number You Want To Be Divided, Then Hit Enter\n";//prints text then goes down one with \n cin>>num;//1st number cout<<"\n";//new line cout<<"Enter Another Number To Get Divided With It, Then Hit Enter To Get Anwser\n";//prints text then goes down one with \n cin>>num2;//2st number cout<<"\n";//new line cout<<num / num2;//divides both numbers cout<<"\n";//new line break;//ends case '4'://multiply case 4 cout<<"\n";//new line cout<<"Enter Your Number You Want To Multiply, Then Hit Enter\n";//prints text then goes down one with \n cin>>num;//1st number cout<<"\n";//new line cout<<"Enter Another Number To Get Multiplied With It, Then Hit Enter To Get Anwser\n";//prints text then goes down one with \n cin>>num2;//2nd number cout<<"\n";//new line cout<<num * num2;//multiples both numbers cout<<"\n";//new line break;//ends case '5'://info for case 5 cout<<"\n";//new line cout<<"\n";//new line cout<<"My First Calculater In C++ Nothing Special\n";//prints text then goes down one with \n cout<<"Make Sure To Use It Eveytime You Have Math Homework :)\n";//prints text then goes down one with \n cout<<"\n";//new line cout<<"\n";//new line cout<<"\n";//new line break;//ends default://this will show up if u hit wrong button cout<<"Not A Real Function, You Fail At Life :) ~BK"; cout<<"\n";//new line cout<<"\n";//new line } } return 0; }



Reply With Quote




Bookmarks