diff options
Diffstat (limited to 'ee1301/wk2/lab2/calc.cpp')
-rw-r--r-- | ee1301/wk2/lab2/calc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ee1301/wk2/lab2/calc.cpp b/ee1301/wk2/lab2/calc.cpp index f2e0e87..f9925b0 100644 --- a/ee1301/wk2/lab2/calc.cpp +++ b/ee1301/wk2/lab2/calc.cpp @@ -7,20 +7,20 @@ int main () { cout << "Enter an equation: "; cin >> a >> op >> b; cout << a << op << b << " = "; - - if (op=='+'){ + + if (op=='+'){ //Addition cout << a + b; } - if (op=='-'){ + if (op=='-'){ //Subtraction cout << a - b; } - if (op=='*'){ + if (op=='*'){ //Multiplication cout << a * b; } - if (op=='/'){ + if (op=='/'){ //Division cout << a / b; } |