Skip to content

cos-p/string-calculator-challenge

 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%