Skip to content

apni-coding/Calculator-Using-React

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#host Link https://astounding-sherbet-af3d50.netlify.app/

Calculator

This is a simple calculator built using React. It performs basic arithmetic calculations and supports additional operations like square root, exponentiation, and logarithm.

Features

  • Addition, subtraction, multiplication, and division operations
  • Exponentiation: x^2, x^3
  • Square root: √x
  • Logarithm: log(x)
  • Ability to input and display expressions
  • Clear input and answer
  • Backspace functionality
  • Change sign of the expression

Getting Started

To run the calculator on your local machine, follow these steps:

  1. Clone the repository:
git clone https://github.com/apni-coding/Calculator-Using-React
  1. Navigate to the project directory:
cd calculator
  1. Install the dependencies:
npm install
  1. Start the development server:
npm start
  1. Open your browser and visit http://localhost:3000 to see the calculator in action.

Usage

  • Enter the mathematical expression using the calculator buttons or by typing directly into the input field.
  • Click the "=" button or press Enter to calculate the result.
  • The calculated result will be displayed in the answer field.
  • To clear the input and answer, click the "C" button.
  • To remove the last character from the input, click the backspace button.
  • To change the sign of the expression (positive/negative), click the "+/-" button.
  • The calculator has a maximum input length of 14 characters.

Technologies Used

  • React: A JavaScript library for building user interfaces
  • mathjs: A comprehensive math library for JavaScript

Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Acknowledgments

  • This calculator was inspired by various online calculators and tutorials.

About

Simple Calculator using react js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published