This is a simple calculator program implemented in C++. It provides various mathematical operations such as addition, subtraction, multiplication, division, exponentiation, square root, sine, cosine, tangent, and logarithm.
- C++ compiler
- Clone the repository or download the source code files.
- Open a terminal or command prompt.
- Navigate to the directory where the source code files are located.
- Compile the program using the following command:
Note: You can replace calculator
with your desired output executable name.
- Run the compiled executable by executing the following command:
- Follow the on-screen instructions to perform various mathematical calculations.
- Select the desired operation by entering the corresponding number.
- Enter the required inputs when prompted.
- View the calculated results on the screen.
- Addition: Adds two numbers.
- Subtraction: Subtracts one number from another.
- Multiplication: Multiplies two numbers.
- Division: Divides one number by another.
- Exponentiation: Raises a number to a specified power.
- Square Root: Calculates the square root of a number.
- Sine: Calculates the sine of an angle.
- Cosine: Calculates the cosine of an angle.
- Tangent: Calculates the tangent of an angle.
- Logarithm: Calculates the natural logarithm of a number.
- Logarithm (Base 10): Calculates the logarithm of a number with base 10.
Contributions are welcome! If you find any bugs or have suggestions for improvements, please create an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
- The mathematical calculations are performed using the C++
<cmath>
library functions.