Algorithm and Flowchart Simple Calculator
Algorithm :
- Initialize val1, val2, oprs, result
- Input val1
- Input val2
- Choose operation (oprs) from +, -, x or :
- If you choose operation (+), then the result = val1 + val2
- If you select operation (-), then result = val1 - val2
- If you select operation (x), then result = val1 * val2
- If you select operation (:), then result = val1 / val2
- Print results
And this is the flowchart :
Comments
Post a Comment