/prefix-calculator

Converting prefix notation to postfix notation and calculating result using stack data structure.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Prefix Calculator Using Stack in C++

Converting prefix notation to postfix notation and calculating result using stack data structure in C++.
Users can load their operation either from file or using interactive mode.

Load from file command: ./main input.txt
Interactive mode: ./main

Example inputs:
- sum 3 4
- div 10 2
- sqrt 25
- sub 90 5
- product 1 2 3 4 5
- abs ans
- min 3 4 9
- max 5 2 11
- exp 2 3
- log 9

ans is the answer of the last operation.