A simple command-line interface (CLI) calculator application in C++. This application allows you to perform basic arithmetic operations easily from your terminal.
- Addition: Add two numbers.
- Subtraction: Subtract one number from another.
- Multiplication: Multiply two numbers.
- Division: Divide one number by another.
- Exit: Exit the application.
Clone the repository from GitHub:
git clone https://github.com/naemazam/basic-calculator-cli.git
cd basic-calculator-cli
To compile the application, make sure you have a C++ compiler installed. Then, run the following commands:
g++ -o calculator calculator.cpp
Run the application:
./calculator
Follow the on-screen prompts to perform arithmetic operations.
Welcome to the Basic Calculator CLI!
1: Addition
2: Subtraction
3: Multiplication
4: Division
5: Exit
Choose an option: 1
Enter the first number: 10
Enter the second number: 5
Result: 15
1: Addition
2: Subtraction
3: Multiplication
4: Division
5: Exit
Choose an option: 4
Enter the first number: 10
Enter the second number: 2
Result: 5
1: Addition
2: Subtraction
3: Multiplication
4: Division
5: Exit
Choose an option: 5
Exiting the application.
Enjoy using basic-calculator-cli! Happy calculating!