https://github.com/jilliennelapid/stackcalculator
Project 1: A Stack (Data Structure) Calculator that implements strings and infix/postfix notation to compute basic operations.
https://github.com/jilliennelapid/stackcalculator
cpp data-structures infix-to-postfix iomanip stack stack-calculator stacks strings
Last synced: 6 months ago
JSON representation
Project 1: A Stack (Data Structure) Calculator that implements strings and infix/postfix notation to compute basic operations.
- Host: GitHub
- URL: https://github.com/jilliennelapid/stackcalculator
- Owner: jilliennelapid
- Created: 2024-03-24T23:10:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-24T23:33:17.000Z (about 2 years ago)
- Last Synced: 2025-03-15T01:43:09.341Z (about 1 year ago)
- Topics: cpp, data-structures, infix-to-postfix, iomanip, stack, stack-calculator, stacks, strings
- Language: C++
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stack Calculator
This projects makes use of ***Stack*** data structure as well as infix and postfix expression structure in order to calculate **single-digit operand** experessions.
* The program can handle the main operands `(^, *, /, %, +, -)` and works with any size expression.
* Groupings can also be made with parentheses/braces/brackets `() {} []` and also they can be nested `{()+[]} - ()`. The program will check the balance of the parentheses to ensure that they are valid.
___
In its current state, the program cannot handle:
* double-digit number operations of any form, such as `(24-3)`, or
* operations with negative numbers, such as `(-2+8)`. The latter will be flagged as an error in the calculator.
Such fuctionality will be worked on and added in the future.