https://github.com/berkaygediz/hm_console
💻 Simple console calculator in C++.
https://github.com/berkaygediz/hm_console
calculator cpp
Last synced: 11 months ago
JSON representation
💻 Simple console calculator in C++.
- Host: GitHub
- URL: https://github.com/berkaygediz/hm_console
- Owner: berkaygediz
- License: gpl-3.0
- Created: 2023-07-03T18:34:29.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T17:53:01.000Z (about 1 year ago)
- Last Synced: 2025-04-01T03:51:17.415Z (about 1 year ago)
- Topics: calculator, cpp
- Language: C++
- Homepage:
- Size: 40 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# HM Console - C++ Command Line Calculator
**HM Console** is a simple C++ command-line application that allows users to perform basic calculator operations.
## Prerequisites
Ensure that you have a C++ compiler installed, such as GCC or Clang, to compile and run the application.
## Usage
1. **Clone the repository:**
```bash
git clone https://github.com/berkaygediz/hm_console.git
cd hm_console
```
2. **Compile the code:**
If you're using GCC or Clang, run:
```bash
g++ main.cpp -o hm_console
```
3. **Run the program:**
```bash
./hm_console
```
## Commands
The following commands are available in the **HM Console**:
- `calcu`: Access the calculator functionality.
- `help`: Display a list of available commands and their descriptions.
### Subcommands for Calculator
Once in the calculator mode, you can use the following subcommands:
- `plus`: Perform addition.
- `minus`: Perform subtraction.
- `multiplication`: Perform multiplication.
- `division`: Perform division.
- `modulus`: Perform modulus operation.
- `exit`: Exit from the calculator or program.
### Example Use Case
```plaintext
------------------
**HM_CONSOLE**
Commands: calcu, help, exit
Enter a command:
calcu
------------------
**SUB-COMMANDS**
Commands: plus, minus, multiplication, division, modulus, exit
Enter a sub-command:
plus
**ADDITION**
Enter the first number:
5
Enter the second number:
3
Result: 8
```
## License
This project is licensed under the Apache License 2.0 - see [LICENSE](LICENSE) for details.