Code Monkey home page Code Monkey logo

calculator's Introduction

Calculator App

A user-friendly, web-based calculator designed to support basic arithmetic operations with the added convenience of memory and history functions. This application aims to combine simplicity with functionality for an enhanced calculating experience.

Features

  • Basic Arithmetic: Perform addition, subtraction, multiplication, and division.
  • Memory Functions: Save and retrieve calculations with ease.
  • History Log: Keep track of your recent calculations and revisit past results.
  • Responsive Design: A versatile layout that looks and works great on both mobile and desktop screens.
  • Dynamic Interaction: See your calculations and results update in real time.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

No prerequisites are needed. The calculator runs in any modern web browser.

Installation

After cloning the repository or downloading the project to your computer, follow these steps to run the calculator app:

  1. Navigate to the project directory where you've saved the files.
  2. Locate the index.html file. This is the entry point to the calculator app.
  3. Right-click on the index.html file and choose Open with from the context menu.
  4. Select your preferred web browser from the list of applications. The calculator app will then open in a new browser tab.

Alternatively, you can simply double-click on the index.html file, and it should automatically open in your default web browser.

Usage

To use the calculator for simple arithmetic operations:

  • Basic Operations: Click on the numeric buttons to input numbers, and use the arithmetic operation buttons (+, -, x, /) to perform calculations.
  • Performing Calculations: After entering your numbers and selecting an operation, click the = button to see the result.
  • Using Memory Functions:
    • M+: Adds the displayed number to the memory.
    • M-: Subtracts the displayed number from the memory.
    • MR: Recalls the number stored in memory to the display.
    • MC: Clears the memory.
  • Viewing History: Click on the History button to view past calculations. Use the Clear button within the history panel to clear past entries.
  • Clearing the Display: Use the AC button to clear the current input and result.

The calculator is designed to be intuitive. If you're familiar with basic calculator operations, you'll find this digital version to be straightforward and easy to use.

Contributing

Contributions make the open source community an amazing place to learn, inspire, and create. Any contributions you make are highly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourAmazingFeature)
  3. Commit your Changes (git commit -m 'Add some YourAmazingFeature')
  4. Push to the Branch (git push origin feature/YourAmazingFeature)
  5. Open a Pull Request

Project Link

Check out the project repository on GitHub: Calculator App Repository

Acknowledgments

calculator's People

Contributors

kesjam avatar

Watchers

 avatar

calculator's Issues

Incorrect result when using memory recall (MR) followed by multiply operation

When performing a calculation using a value recalled from memory (MR) and then immediately multiplying, the calculator returns an incorrect result of 0 instead of the expected multiplication.

Steps to reproduce:

Enter a value and store it to memory (e.g. 80000, then press the "M+" button to save to memory)
Press "MR" to recall the stored value of 80000
Press "x" to multiply
Enter a value to multiply by (e.g. .20)
Observe that the calculator shows "0 x 80000 = 0" instead of the correct "80000 x 0.2 = 16000"

Expected behavior:

When a value is recalled from memory using MR and then multiplied by another number, the calculator should perform the multiplication correctly and return the expected result.

Actual behavior:

The calculator is incorrectly showing a multiplication by 0 and returning an incorrect result of 0, rather than multiplying the memory recall value by the entered multiplier.

Please investigate this bug with MR followed by the multiply operation. Let me know if you need any other details to reproduce or troubleshoot the issue. Thank you!

I hope this bug report template is helpful for documenting the issue you encountered with your calculator app. Let me know if you would like me to modify anything in the report.
Screenshot 2024-03-18 at 10 12 24 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.