https://github.com/calculationcollective/ccalculator
Calculator in C
https://github.com/calculationcollective/ccalculator
c calculator
Last synced: about 1 month ago
JSON representation
Calculator in C
- Host: GitHub
- URL: https://github.com/calculationcollective/ccalculator
- Owner: CalculationCollective
- License: other
- Created: 2023-01-19T16:28:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T09:25:39.000Z (over 3 years ago)
- Last Synced: 2025-02-26T02:41:29.252Z (over 1 year ago)
- Topics: c, calculator
- Language: C
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CCalculator
- [CCalculator](#ccalculator)
- [Build the calculator](#build-the-calculator)
- [Use the calculator](#use-the-calculator)
## Build the calculator
To build this project you will need make and CMake.
To start we'll need a folder prefered with the name build.
```bash
mkdir build
```
After we createt the folder we go into it and execute the CMake command.
```bash
cmake ../src
```
The `../src` should show to the src directory in this project.
You can build it with
```bash
make
```
We now should have a `calculator` file in our folder. We can easily execute this with
```bash
./calculator
```
## Use the calculator
After executing the calculator you can enter the first number.
```bash
Enter first number: 5 # 5 is the input
```
Then choose between the calculation functions.
```bash
Choose between:
1)Addition
2)Subtraction
3)Multiplication
4)Division
1 # < This is our input
```
We now can enter the second number
```bash
Enter second number: 2 # 2 is the input
```
Now it should give the right output.
```bash
7 # 7 is the return value
```