Skip to content

This is a basic C++ calculator program that performs arithmetic operations (+, -, *, /) on two numbers based on the operator entered by the user.

Notifications You must be signed in to change notification settings

avimishraa/Simple_Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Simple Calculator

This is a basic C++ calculator program that performs arithmetic operations (+, -, *, /) on two numbers based on the operator entered by the user.


Features

  • Supports addition, subtraction, multiplication, and division.
  • User inputs the operator and two numbers.
  • Displays the result in a clear and formatted manner.

How to Use

  1. Compile the program using a C++ compiler:

    g++ simpleCalculator.cpp -o simpleCalculator.exe
  2. Run the executable:

    ./simpleCalculator.exe
  3. Follow the on-screen prompts:

    • Enter an operator (+, -, *, or /).
    • Enter two numbers (a and b).
    • View the result displayed in the format:
    • Result [a b] =

Example

Enter the operator: -
Enter the number:
a = 7
b = 9
Result [a - b] = -2

Author

Avinash Mishra
GitHub: @avimishraa


License

This project is open-source and free to use for educational purposes.

About

This is a basic C++ calculator program that performs arithmetic operations (+, -, *, /) on two numbers based on the operator entered by the user.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages