Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Adrian-rospx/calc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Calculator Project

Parser and solver for mathematical expressions supporting 5 operators (+, -, *, /, ^) for intager addition, substraction, multiplication, division and exponentiation, as well as parentheses ('(', ')')!

It converts expressions to machine-friendly postfix notation and finds the result using Dijkstra's shunting yard algorithm.

Example usage:

Type in a mathematical expression:
15 + 17 * (2+3) 

Output:

Starting tokens:
15 + 17 * ( 2 + 3 )
Postfix conversion:
15 17 2 3 + * +
Final result:
= 100