Skip to content

bunwinid/DIP02-Bun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DIP02 Calculator

Description

DIP02 Calculator is a web-based calculator application. It provides basic arithmetic operations with a clean and responsive user interface(UI).

Features

  • Basic arithmetic operations: addition, subtraction, multiplication, division
  • Percentage calculation
  • Positive/negative toggle
  • Decimal point support
  • Clear function (AC)
  • Responsive design for various screen sizes

Files

The project consists of three main files:

  1. index.html: The main HTML structure of the calculator
  2. style.css: CSS file for styling the calculator
  3. script.js: JavaScript file containing the calculator's logic

Usage

To use the calculator:

  1. Open the index.html file in a web browser.
  2. Click on the buttons to input numbers and operations.
  3. Press '=' to calculate the result.
  4. Use 'AC' to clear the display and start a new calculation.

HTML Structure

The HTML file creates the basic structure of the calculator, including:

  • A display area to show the current input and results
  • Buttons for digits 0-9
  • Buttons for arithmetic operations (+, -, ×, ÷)
  • Special function buttons (AC, +/-, %, .)

CSS Styling

The CSS file provides styling for the calculator, including:

  • A dark theme with orange accent colors
  • Responsive grid layout for buttons
  • Hover and active states for buttons
  • Flexible display area for showing calculations

JavaScript Functionality

The JavaScript file handles the calculator's logic, including:

  • Input handling for digits and decimal point
  • Implementation of arithmetic operations
  • Display updating
  • Clear function
  • Error handling for invalid operations

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published