Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 418 Bytes

README.md

File metadata and controls

14 lines (10 loc) · 418 Bytes

String Calculator Challenge

The aim of this challenge is to implement a simple integer calculator. The calculator takes a string of space-separated numbers and operators (like "1 + 2 + 3" or "10 + 4 - 5") and returns the result of the calculation.

It should resolve the following sums:

  • "1"
  • "1 + 1"
  • "1 + 2 + 3"
  • "10 - 6"
  • "10 + 5 - 6"
  • "10 * 5"

If an operator isn't known, an exception should be thrown.