Skip to content

CBOcoding/calculator_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator Project Evolution

This project documents the journey of building a functional web-based calculator, evolving through three distinct versions of design and logic.


🚀 Version 3 (Current)

The final iteration features a sleek, dark-themed UI with a modern circular button layout and advanced JavaScript logic.

Key Logic Features:

  • Floating Point Correction: Fixes binary rounding errors (e.g., 1.1 - 1 = 0.1).
  • Chain Calculations: Allows continuing math operations on previous results.
  • Smart Operator Input: Prevents consecutive operators (e.g., +++) by replacing the last one entered.
  • State Management: Intelligently clears the screen when starting a new calculation after a result.

Calc v3 Screenshot


🛠️ Version 2

A transitional phase focusing on a cleaner grid layout and improved color contrast using a table-based structure.

Calc v2 Screenshot


🐣 Version 1

The initial prototype exploring basic HTML structure, table layouts, and core CSS styling.

Calc v1 Screenshot


📝 Technologies Used

  • HTML5: Structured semantic markup.
  • CSS3: Custom layouts, Flexbox, and Google Fonts integration.
  • JavaScript (ES6+): Event delegation, string manipulation, and mathematical evaluation.

📂 Project Structure

  • calc_v[1-3].html: The entry points for each version.
  • style_v[1-3].css: The evolution of the visual design.
  • script.js: Core logic shared and improved across versions.

About

simple calculator HTML + CSS + JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors