aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2/lab2/calc.cpp
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-02-13 15:39:19 -0600
committerMatthew Strapp <msattr@gmail.com>2019-02-13 15:39:19 -0600
commitfff3f3f155f0624c1fcd38db8ef19d9a85464891 (patch)
tree8b8ba2e5f4bf7b2cf68e0eae98b0511f6b5ded24 /ee1301/wk2/lab2/calc.cpp
parentFix spacing again (diff)
downloadhomework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.tar
homework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.tar.gz
homework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.tar.bz2
homework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.tar.lz
homework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.tar.xz
homework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.tar.zst
homework-fff3f3f155f0624c1fcd38db8ef19d9a85464891.zip
Meaningful comments
Diffstat (limited to '')
-rw-r--r--ee1301/wk2/lab2/calc.cpp10
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;
}