CALCULATOR WITH ๐งช๐งฎ SCIENTIFIC FUNCTIONS
๐ scientific-calculator
|
โโโ ๐ README.md
โโโ src
โโโ ๐ main.cpp
โโโ ๐ Calculator.h
โโโ ๐ Calculator.cpp
โโโ ๐ .gitignore
The project folder structure consists of the following files:
-
๐ README.md: This file contains the documentation and information about the scientific calculator project, including how to use it and any additional details.
-
๐ main.cpp: This file is the entry point of the program, where an instance of the
Calculator
class is created and itsrun()
function is called. -
๐ Calculator.h: This file contains the declaration of the
Calculator
class and its member functions. -
๐ Calculator.cpp: This file contains the definition of the
Calculator
class member functions.
To use the scientific calculator, follow these steps:
-
Clone or download this project repository.
-
Compile the source code files
main.cpp
andCalculator.cpp
using a C++ compiler. -
Run the compiled executable.
-
Enter the operation you want to perform:
+
for addition-
for subtraction*
for multiplication/
for divisions
for square rootp
for exponentiation
-
Follow the prompts to enter the required numbers or values for the selected operation.
-
The calculator will display the result of the operation.
-
Repeat the process to perform additional calculations.
The scientific calculator is implemented using a class called Calculator
. The class encapsulates the calculator functionality, including the different arithmetic operations and other mathematical functions.
The Calculator
class has member functions for each operation, such as performAddition()
, performSubtraction()
, performMultiplication()
, performDivision()
, performSquareRoot()
, and performExponentiation()
. These functions handle user input and perform the corresponding calculations.
The run()
function serves as the entry point for the calculator. It prompts the user for the desired operation and calls the appropriate member function based on the input.
The main program in main.cpp
creates an instance of the Calculator
class and invokes its run()
function to start the calculator.
If you encounter any issues or errors while using the scientific calculator, consider the following:
-
Double-check that the source code files
main.cpp
,Calculator.h
, andCalculator.cpp
are present and correctly placed in the same directory. -
Ensure that you have a C++ compiler installed on your system and that it supports the C++ version used in the project.
-
Verify that you are entering valid inputs for the calculator operations and following the prompts correctly.
If the problem persists, feel free to open an issue in the GitHub repository for further assistance.
This README file provides an overview of the scientific calculator project, its folder structure, usage instructions, code explanation, and troubleshooting tips. Use it as a guide to understand and utilize the scientific calculator.