Skip to content

Files

Latest commit

 

History

History
9 lines (8 loc) · 644 Bytes

README.md

File metadata and controls

9 lines (8 loc) · 644 Bytes

String Calculator

Develop a Calculator that takes a string as input and outputs its calculated result. The operations the calculator should support are plus and minus. The Calculator should return an Integer that represents the correctly calculated operation. For example: when the calculator is given the string '1 + 3 - 5' as input it should return the integer -1. The calculator does not need to cater for more than 4 parameters and the characters in the input it need to be able to handle numbers (integers up to 1000) and the characters '+' and '-'. The calculator handling whitespaces (ignoring them) is optional.