The calculator works more like the Windows calculator. For example, if you press a few numbers with multiple dual operators in there, the calculator will give you the answer to the first two numbers. Also, the number of digits that you can input like in an iPhone calculator has been limited to 9 and this goes for the result as well. The programming languages used include

  • Javascript
  • HTML
  • CSS

The number of digits that you can input like in an iPhone calculator has been limited to 9 and this goes for the result as well. If you try to input more numbers, they will not display. Also if the result of your calculations has more than nine digits, it will overflow.

Calculator screenshot

If you get overflow as an answer, you cannot do more arithmetic operations until you reset the calculator using the ‘AC’ button. This goes also for any division by zero. The output will be an error and if you try to do more calculations without resetting the button, the buttons will not work.

I hosted this app on GitHub pages and a live demo can be found at https://wanjiru-njuguna.github.io/iPhone-Calc/calculator.html