1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
#include <iostream>
#include <string>
using namespace std;
int main()
{
string answer=("Yes","yes","No","no");
string operation=("Multiply","multiply","Summarize","summarize","Substract","substract","Divide","divide");
int x,y;
cout << "Hello,my name is Alpha,please state your name before we continue: " << endl;
string name;
cin >> name;
cout << name << ", Good to meet you. Shall we Continue? (Yes or No) " << endl;
cin >> answer;
if(answer=="Yes","yes"){cout << "Alright " << name << " what would you like to do? (Multiply,summarize,substract,divide)" << endl;}
else{
if(answer=="No","no"){cout << "Alright " << name << " Hope to talk with you soon again. Have a good time!" << endl;} }
cin >> operation;
if(operation=="Multiply","multiply"){cout << "Please give me your first integer: " << endl; }
cin >> x;
cout << x << ",alright now give me your second integer: " << endl;
cin >> y;
cout << x*y << " There you go, anything else?(Multiply,summarize,substract,divide" << endl;
cin >> operation;
else{
if(answer=="Summarize","summarize"){cout << "Summarizing eh? Ok,give me your first integer: " << endl;}
cin >> x;
cout << x << ",and your second integer?" << endl;
cin >> y;
cout << x+y << ",there's your result! Got anything more challenging for me?(Multiply,summarize,substract,divide)" << endl;
cin >> operation;}
else{
if(answer=="Substract","substract"){cout << "Oh i love substracting, give me your first integer: " << endl;}
cin >> x;
cout << x << ", and your second integer?" << endl;
cin >> y;
cout << x-y << ", hows that for super speedy answer! Do you have anything else that you need me to do?(Multiply,summarize,substract,divide)" << endl;
cin >> operation;}
else{
if(answer=="Divide","divide"){cout << "Division, hmmmm, alright,give me your first integer: " << endl;}
cin >> x;
cout << x << ",what would your second integer be?" << endl;
cin >> y;
cout << x/y << ",i think i did right! I hate division... well" << name << " got anything else for me?(Multiplay,summarize,substract,divide)" << endl;
cin >> operation; }
return 0;
}
|