Skip to content

ishrestha/stack-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

stack-Calculator

Uses stack push and pop method to calculate. This is how it works. You will input numbers and symbols to add, subtract, multiply and divde. For example once I run the program you will have text box where you can input: 222*/ >>>>>> 2 3344/ >>>>> 9 This is how it works: for 1st example- starts from the last string. It reads the string evaluates it if it is a number or a operations. This should always be a operations. It will give an error if it is a number. Once operator is found, it will look for two first numbers. Once found operation is performed with the found operators and numbers. The answer of the number is stacked right below of the last number that has not be popped to do the operations.

I hope this makes sense else you can learn about stack data structure before trying to understand this program.

About

Uses stack push and pop method to calculate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages