LIVE PREVIEW LINK: https://jdplumst.github.io/calculator/
This is a calculator created using HTML, CSS and JavaScript.
The calculator works by evaluating a single pair of numbers at a time. For example, if we want to evaluate 12+7-5*3 it would be evaluated as so:
12 + 7 - 5 * 3 = 19 - 5 * 3 = 14 * 3 = 42
The % operator works by entering a number then clicking the % operator. This converts the entered number to a percentage. For example, it would covert 4 to 0.04 and 700 to 7.
The +/- operator works by changing the sign of the currently displayed number. If the number is currently positive, then it gets changed to negative. If the number is currently negative, then it gets changed to positive.
The A/C button resets the calculator to its intial state. 0 will be displayed on the screen and results from the previous calculations will be erased.