/Dumb_iOS_Calculator

This calculator uses a stack to do math. It's weird for some people to understand so use the read to understand how to use it.

Primary LanguageSwift

Dumb_iOS_Calculator

This calculator uses a stack to do math. It's weird for some people to understand so use the read to understand how to use it.

HOW TO USE: This calculator uses postfix notation. Thats what the simplest calculators used in the old days (think the year 1890) .

Instead of typing your numbers with the operation first,
put the operation after the two numbers you want to do calculator magic on. 
For example , to add two numbers you can type

“1”, "Enter (Arrow)", “2”, "Enter" ,“+” 
and the number 3 will appear on the screen.
To add a list of 5 numbers you can type :

“1” , "Enter" , “2”, "Enter" ,“3”, "Enter" ,“4”, "Enter" ,“5”, "Enter" ,“+”,”+”,”+”,”+” 

and the number 10 will appear.

This is the WRONG way to operate on two numbers

“1”,"Enter" ,”+”, "Enter" ,“ 2”
The operation goes after the numbers not in the middle.