/React-calculator

This is react based calculator app that implements all the basic functionalities of a calculator, with a modern look.

Primary LanguageJavaScript

React Calculator App

This is a simple calculator app built using React. It allows users to perform basic arithmetic calculations such as addition, subtraction, multiplication, and division. The app provides a user-friendly interface for performing calculations.

Features

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Clear (C) - Resets the calculator
  • Delete (DEL) - Removes the last input character
  • Equal (=) - Calculates the result of the expression

Installation

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

  1. Clone this repository:
git clone https://github.com/your-username/react-calculator-app.git
  1. Navigate to the project directory:
cd react-calculator-app
  1. Install the required dependencies:
npm install
  1. Start the development server:
npm start

The app should now be running on http://localhost:3000/.

Usage

  1. Enter your desired numeric values and arithmetic operators by clicking the buttons.

  2. Press the "Equal (=)" button to calculate the result.

  3. To clear the input or result, press the "Clear (C)" button.

Technologies Used

  • HTML
  • React
  • JavaScript
  • CSS

Structure

The app's source code is organized into components:

  • App.js - The main application component.
  • Calculator.js - The calculator component that handles calculations and user input.
  • Button.js - The button component used for numeric and operator buttons.

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push your changes to your fork.
  5. Submit a pull request to the original repository.

License

This project is licensed under the MIT License.

Author

Acknowledgments

Special thanks to the React community and the creators of various tutorials and resources that helped in building this calculator app.


Feel free to use and modify this calculator app for your projects. If you have any questions or suggestions, please feel free to reach out to the author. Enjoy calculating!