From deb4cba62f072428955bbacaa0b433773e6d7df1 Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Wed, 13 Feb 2019 14:42:37 -0600 Subject: S P A C I N G --- ee1301/wk2/lab2/calc.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ee1301/wk2') diff --git a/ee1301/wk2/lab2/calc.cpp b/ee1301/wk2/lab2/calc.cpp index fbc82dd..f2e0e87 100644 --- a/ee1301/wk2/lab2/calc.cpp +++ b/ee1301/wk2/lab2/calc.cpp @@ -7,17 +7,22 @@ int main () { cout << "Enter an equation: "; cin >> a >> op >> b; cout << a << op << b << " = "; + if (op=='+'){ cout << a + b; } + if (op=='-'){ cout << a - b; } + if (op=='*'){ cout << a * b; } + if (op=='/'){ cout << a / b; } + cout << endl; } -- cgit v1.2.3