Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glubs9/simple-c-command-line-calculator
a simple c command line calculator made for fun!
https://github.com/glubs9/simple-c-command-line-calculator
Last synced: 16 days ago
JSON representation
a simple c command line calculator made for fun!
- Host: GitHub
- URL: https://github.com/glubs9/simple-c-command-line-calculator
- Owner: Glubs9
- Created: 2021-04-08T08:22:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-11T12:52:48.000Z (almost 4 years ago)
- Last Synced: 2024-11-09T13:40:40.593Z (2 months ago)
- Language: C
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple-c-command-line-calculator
a simple c command line calculator made for fun!# installation
linux only unless you want to manually compile my files.
to install just download everything and run make.
to run just run ./main .# requirements
gcc# usage
just enter in a maths equation with only four functions, +-\*\/ , and also brackets if you want. The calculator was design to be as easy to write as possible so it only supports up to 100 numbers and only up to 10 digits long.# file structure
if you want to contribute or fork this, feel free to do so!
the files purposes are as follows
main.c: the main running code that takes input and runs the algorithm over it.
lex.h: lexer (splits the input into tokens/splits the input into numbers and operators)
parse.h: converts tokens into reverse polish notation.
rpn.h: runs a reverse polish notation input.
constants.h: holds the constant MAX_NUM_SIZE and also some debugging functions and the function is_operator.# what i learnt from this
not much, but I have just now learnt how header files are supposed to be used and this is not how. rip