https://github.com/basemax/postfixevaluatorc
This is a postfix evaluator written in C. It takes a postfix expression as input and evaluates it. It supports the following operators: + - * / ^ ( )
https://github.com/basemax/postfixevaluatorc
c evaluator postfix postfix-evaluation postfix-evaluator stack
Last synced: 8 months ago
JSON representation
This is a postfix evaluator written in C. It takes a postfix expression as input and evaluates it. It supports the following operators: + - * / ^ ( )
- Host: GitHub
- URL: https://github.com/basemax/postfixevaluatorc
- Owner: BaseMax
- License: gpl-3.0
- Created: 2022-12-02T23:09:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-02T23:34:41.000Z (over 3 years ago)
- Last Synced: 2025-10-03T23:38:24.665Z (8 months ago)
- Topics: c, evaluator, postfix, postfix-evaluation, postfix-evaluator, stack
- Language: C
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Postfix Evaluator C
This is a postfix evaluator written in C. It takes a postfix expression as input and evaluates it. It supports the following operators:
`+` `-` `*` `/` `^` `(` `)`
## Usage
To compile the program, run `gcc PostfixEvaluator.c -o PostfixEvaluator` in the root directory. This will create an executable called `PostfixEvaluator`.
To run the program, run `./PostfixEvaluator` with the postfix expression as an argument. For example, `./PostfixEvaluator 23+` will evaluate `2 + 3` and print `5`.
## Example
```
$ ./PostfixEvaluator "25+"
7
$ ./PostfixEvaluator "29*"
18
$ ./PostfixEvaluator "642+*"
36
```
## License
This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.
© Copyright Max Base, 2022