#include <iostream>
usingnamespace std;
int main()
{
int a;
int b;
int sum;
int start;
char sign;
int remainder;
cout <<"Press 1 to start the calculator\n";
cin >> start;
if(start == 1)
{
cout <<"Starting Calculator...\n";
}
else
{
return 0;
}
cout <<"Enter the first number\n";
cin >> a;
cout <<"Enter the sign + , - , * , or /\n";
cin >> sign;
cout <<"Enter another number.\n";
cin >> b;
if(sign == '+')
{
sum = a + b;
cout <<"The answer of " << a << sign << b << " is: " << sum << endl;
}
elseif(sign == '-')
{
sum = a - b;
cout <<"The answer of " << a << sign << b << " is: " << sum << endl;
}
elseif(sign == '*')
{
sum = a * b;
cout <<"The answer of " << a << sign << b << " is: " << sum << endl;
}
elseif(sign == '/')
{
sum = a / b;
remainder = a % b;
cout <<"The answer of " << a << sign << b << " is: " << sum << " Remainder: " << remainder << endl;
}
else
{
cout<<"You entered an invalid sign."<<endl;
}
return 0;
}