//catchOS 1.0001 full adding, subtracting
//multiplying and dividing calculator
#include <iostream>
#include <stream>
int main ()
{
string plusminus
int a, b, result
result = a + b ;
cout << " Welcome to catchOS 1.0001 " << endl ;
cout << " This version is able to add, minus, times and divide " << endl ;
cout << " Which kind of sum would you like to do: " ;
getline (cin, plusminus);
cout << " What is the first number in your " << plusminus << " sum " ;
cin >> a;
cout << " What is the second number in your " << plusminus << " sum " ;
cin >> b;
if (plusminus == "add")
a + b = result;
elseif (plusminus == "minus")
a - b = result;
elseif (plusminus == "divide")
a / b = result;
elseif (plusminus == "times")
a * b = result;
else
cout <<
" the program does not understand your statement, " << endl <<
" please remember to use the statements 'add' , 'minus' " << endl <<
" 'times' and 'divide' ";
cout << " The answer of " << a << plusminus << b << " = " << result;
return 0;
}
operator = is for assignment, not for comparison add is not declared in your program, if you want a string use double quotes
operator = assigns the value of the right operand to the left operand