Okay, the objective of this is to have the user pick one of the four basic arithmetic operations (addition, subtraction, multiplication and division), and then pick the 2 integers for the operation, and then have the program spit out the result. I seem to be having a problem storing the symbol for the math operation and then using it at the end to actually perform the math. Here's what I got so far:
#include <iostream>
using namespace std;
int main ()
{
char symbol;
int a;
int b;
cout << "Please decide what kind of operation you want done; +, -, * or /: ";
cin >> symbol;
cout << "Now please enter the first number: ";
cin >> a;
cout << "And the second: ";
cin >> b;
int c = a, symbol, c;
cout << c;
}
I think my problem is how the symbol is stored, and char isn't cutting it.
So, any advice would be great!