https://github.com/naemazam/basic-calculator-cli
A simple command-line interface (CLI) calculator application in C++. This application allows you to perform basic arithmetic operations easily from your terminal.
https://github.com/naemazam/basic-calculator-cli
calculator calculator-application cli cpp cpp17 naemazam
Last synced: 7 months ago
JSON representation
A simple command-line interface (CLI) calculator application in C++. This application allows you to perform basic arithmetic operations easily from your terminal.
- Host: GitHub
- URL: https://github.com/naemazam/basic-calculator-cli
- Owner: naemazam
- Created: 2024-06-08T06:01:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-08T06:32:42.000Z (over 1 year ago)
- Last Synced: 2025-01-20T17:17:05.910Z (9 months ago)
- Topics: calculator, calculator-application, cli, cpp, cpp17, naemazam
- Language: C++
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# basic-calculator-cli
A simple command-line interface (CLI) calculator application in C++. This application allows you to perform basic arithmetic operations easily from your terminal.
## Features
1. **Addition**: Add two numbers.
2. **Subtraction**: Subtract one number from another.
3. **Multiplication**: Multiply two numbers.
4. **Division**: Divide one number by another.
5. **Exit**: Exit the application.## Installation
Clone the repository from GitHub:
```bash
git clone https://github.com/naemazam/basic-calculator-cli.git
cd basic-calculator-cli
```## Building
To compile the application, make sure you have a C++ compiler installed. Then, run the following commands:
```bash
g++ -o calculator calculator.cpp
```## Usage
Run the application:
```bash
./calculator
```Follow the on-screen prompts to perform arithmetic operations.
## Example
```bash
Welcome to the Basic Calculator CLI!1: Addition
2: Subtraction
3: Multiplication
4: Division
5: ExitChoose an option: 1
Enter the first number: 10
Enter the second number: 5
Result: 151: Addition
2: Subtraction
3: Multiplication
4: Division
5: ExitChoose an option: 4
Enter the first number: 10
Enter the second number: 2
Result: 51: Addition
2: Subtraction
3: Multiplication
4: Division
5: ExitChoose an option: 5
Exiting the application.
```## Contributing
Enjoy using basic-calculator-cli! Happy calculating!