Skip to content

A sleek, iPhone-inspired calculator built with JavaScript, HTML, and CSS. This responsive calculator supports basic arithmetic operations, features an intuitive button layout, and includes error handling and keyboard shortcuts for efficient use. Ideal for quick calculations with a design that adapts to various screen sizes.

Notifications You must be signed in to change notification settings

https-sharif/iphone-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iPhone Calculator

A sleek and responsive JavaScript calculator inspired by the iPhone. Perfect for quick calculations with an intuitive button layout and error-free operation. This project demonstrates core JavaScript functionalities, DOM manipulation techniques, and responsive design principles.

Features

Basic Operations: Perform addition, subtraction, multiplication, and division.
Clear Screen: Reset the display to its initial state using the AC button.
Delete: Remove the last entered character using the del button.
Responsive Design: The calculator adjusts its layout based on the screen size, making it mobile-friendly.
Error Handling: Displays an error message for invalid calculations.
Keyboard Shortcuts: Supports various keyboard shortcuts for efficient usage.

Keyboard Shortcuts

  • 0-9: Enter a digit.
  • Enter / =: Calculate the result.
  • Backspace / Delete: Delete the last character.
  • C: Clear the screen.

Additional Features

Supports basic arithmetic operations.
Displays up to 9 decimal places for precise calculations.
Mobile-friendly design inspired by the iPhone calculator.

Usage

1. Clone the Repository:

git clone https://github.com/https-sharif/iphone-calculator.git

2. Navigate to the project directory:

cd iphone-calculator

3. Open the index.html file

open index.html

Repository Content

HTML File
CSS File
Javascript File
Favicon PNG

Implementation Details

  • HTML: The structure of the calculator, including buttons and display areas.
  • CSS: Basic styling to make the calculator visually appealing and responsive.
  • JavaScript: Handles button clicks, updates the display, performs calculations, and manages errors.

Demo

You can view a live demo of the project here.

Preview

JavaScript Calculator

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests for improvements and new features.

About

A sleek, iPhone-inspired calculator built with JavaScript, HTML, and CSS. This responsive calculator supports basic arithmetic operations, features an intuitive button layout, and includes error handling and keyboard shortcuts for efficient use. Ideal for quick calculations with a design that adapts to various screen sizes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published