An open API service indexing awesome lists of open source software.

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.

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: 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.
```

## Contributing

Enjoy using basic-calculator-cli! Happy calculating!