Skip to content

This is a basic calculator application built using HTML, CSS, and JavaScript. The application provides basic arithmetic calculations such as addition, subtraction, multiplication, and division.

Notifications You must be signed in to change notification settings

drawdejohn/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator

Overview

This is a basic calculator application built using HTML, CSS, and JavaScript. The application provides basic arithmetic calculations such as addition, subtraction, multiplication, and division.

Live App

You can try the live app here

How to Use

To use the calculator, simply enter a number by clicking or keyboard input, choose an operation, enter another number, and click the equals button to display the result. The calculator also provides the option to clear the input or delete the last entered character.

Technologies Used

  • HTML
  • CSS
  • JavaScript

Features

  • Basic arithmetic operations: addition, subtraction, multiplication, and division.
  • Clear input and delete last entered character options.
  • Dynamic button animations on click.
  • Decimal button can only be used once per input.
  • Backspace button removes the last entered character without affecting the result.
  • Consecutive operator clicks result in the use of the last clicked operator.
  • Calculation is prevented if equal is pressed, and the last clicked button is an operator.
  • Precision variable allows adjusting the number of decimal places displayed.
  • Automatic removal of leading 0 if a number is inputted with one.
  • Automatic addition of 0 before the decimal point if it's the first input. Automatic removal of 0 if the decimal point is deleted.
  • Maximum number of characters displayed on the calculator screen is limited to prevent overflow.

Credits

This project was built as part of my web development course. The original idea came from The Odin Project's Calculator Project.

About

This is a basic calculator application built using HTML, CSS, and JavaScript. The application provides basic arithmetic calculations such as addition, subtraction, multiplication, and division.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published