#include<iostream>
#include<string>
using namespace std;
void main()
{
string password,answer;
float x,y;
float sum,difference,product,quotient;
char Operation;
cout<<"enter password:"<<endl;
cin>>password;
if (password=="rhino")
{
cout<<"enter Letter Operation"<<endl;
cout<<"a for Addition"<<endl;
cout<<"s for Subtraction"<<endl;
cout<<"m for Multiplication"<<endl;
cout<<"d for Division"<<endl;
cin>>Operation;
while(answer!="no")//(answer=="yes");
{
switch(Operation)
{
case 'a':
cout<<"enter first number"<<endl;
cin>>x;
cout<<"enter second number"<<endl;
cin>>y;
sum=x+y;
cout<<"The sum is:"<<sum<<endl;
cout<<"do you want to continue?"<<endl;
cout<<"Yes or No:"<<endl;
cin>>answer;
if (answer=="yes"){
cout<<"enter Letter Operation"<<endl;
cout<<"a for Addition"<<endl;
cout<<"s for Subtraction"<<endl;
cout<<"m for Multiplication"<<endl;
cout<<"d for Division"<<endl;
cin>>Operation;}
break;
case 's':
cout<<"enter first number"<<endl;
cin>>x;
cout<<"enter second number"<<endl;
cin>>y;
difference=x-y;
cout<<"The difference is:"<<difference<<endl;
cout<<"do you want to continue?"<<endl;
cout<<"Yes or No:"<<endl;
cin>>answer;
if(answer=="yes"){
cout<<"enter Letter Operation"<<endl;
cout<<"a for Addition"<<endl;
cout<<"s for Subtraction"<<endl;
cout<<"m for Multiplication"<<endl;
cout<<"d for Division"<<endl;
cin>>Operation;}
break;
case 'm':
cout<<"enter first number"<<endl;
cin>>x;
cout<<"enter second number"<<endl;
cin>>y;
product=x*y;
cout<<"The product is:"<<product<<endl;
cout<<"do you want to continue?"<<endl;
cout<<"Yes or No:"<<endl;
cin>>answer;
if(answer=="yes"){
cout<<"enter Letter Operation"<<endl;
cout<<"a for Addition"<<endl;
cout<<"s for Subtraction"<<endl;
cout<<"m for Multiplication"<<endl;
cout<<"d for Division"<<endl;
cin>>Operation;}
break;
case 'd':
cout<<"enter first number"<<endl;
cin>>x;
cout<<"enter second number"<<endl;
cin>>y;
quotient=x/y;
cout<<"The quotient is:"<<quotient<<endl;
cout<<"do you want to continue?"<<endl;
cout<<"Yes or No:"<<endl;
cin>>answer;
if(answer=="yes"){
cout<<"enter Letter Operation"<<endl;
cout<<"a for Addition"<<endl;
cout<<"s for Subtraction"<<endl;
cout<<"m for Multiplication"<<endl;
cout<<"d for Division"<<endl;
cin>>Operation;}
break;
default:
cout<<"Letter Incorrect"<<endl;
break;
}
}
}else
cout<<"SoRRy WrOng PaSSwOrd!!!TrY AgaIn...";
}