Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.
/ prefix-calculator Public archive

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

License

Notifications You must be signed in to change notification settings

0x01h/prefix-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages