INFO 449 - HW2 - SimpleCalc
It is a console calculator.
- Enter a number(s) seperated by spaces then hit return
- Enter an operation then hit return
- Operations supported are:
- Add: +
- Subtract: -
- Multiply: *
- Divide: /
- Modulus: %
- Factorial: fact
- Average: avg
- Count: count
- Sum: sum
- Enter another number if the operation was +, -, /, %, * and then hit return
- fact only supports single number input
$ SimpleCalc
Enter an expression separated by returns:
15
+
27
Result: 42
$ SimpleCalc
Enter an expression separated by returns:
15
-
27
Result: -12
$ SimpleCalc
Enter an expression separated by returns:
10 4 25 17 5
count
Result: 5
$ SimpleCalc
Enter an expression separated by returns:
5
fact
Result: 120