123456789101112131415161718
#include <iostream> using namespace std; int main (){ cout << "Simple Calculator: \n"; cout << ""; cout << "Enter a Operator [+ , - , / , *]\n"; char op; cin >> op; if(op == '+'){ cout << "Enter two digits:\n"; double x,y,ans; cin >> x >> y; x + y = ans; } }
ans = x + y;
x + y = ans;