Skip to content

Matt-y-Ice/stack_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Stack Calculator

A simple stack-based calculator implemented in C that converts infix expressions to postfix and evaluates them.

Features

  • Converts infix expressions to postfix notation
  • Evaluates postfix expressions
  • Handles multi-digit numbers and basic arithmetic operators (+, -, *, /)

Usage

Compilation

Compile the program using gcc:

gcc -o stack_calculator stack_calculator.c

Runing the program

To run the program, pass an infix expression as a command-line argument (note: current version does not handle floats as inputs)

./stack_calculator "3+5*2"
# Output: 13.000000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages