Calculator

February 8, 2022 ยท View on GitHub

Create a calculator that can handle sum and subtraction operations. This calculator will receive a string and returns the result. For example:

  • "1 + 1" = 2
  • "1 - 1" = 0
  • "4 + 2 + 1 + 3" = 11
  • "4 - 2 + 1" = 3