Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.88 KB

README.md

File metadata and controls

41 lines (30 loc) · 1.88 KB

Simple Calculator App

This is a simple calculator web application built using HTML, SCSS, and TypeScript. It allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division. Used the Shunting Yard Algorithm and Post Fix Evaluation to implement BIDMAS/PEMDAS.

Features

  • Basic arithmetic operations: addition (+), subtraction (-), multiplication (*), division (/) and exponents (x^y)
  • Clear button (AC) to clear the display.
  • Delete button (DEL) to delete the last entered character.
  • Equals button (=) to calculate the result.

Technologies Used

  • HTML: Markup language used to structure the web page.
  • SCSS: Stylesheet language used for styling the calculator interface.
  • TypeScript: Typed superset of JavaScript used for adding interactivity and logic to the calculator.

How to Use

  1. Clone or download the repository to your local machine.
  2. Open terminal and run npm install in the directory.
  3. Then run "npm run dev".
  4. open the local host link in the terminal.
  5. Enjoy using the simple calculator!

Demo : https://athishthayalan.github.io/calculator/

Project Structure

  • index.html: Main HTML file containing the calculator interface.

  • style.scss: Main SCSS file that imports and compiles all other SCSS partials.

  • buttons.scss: SCSS partial containing styles for the calculator buttons.

  • calculator.scss: SCSS partial containing styles for the calculator container.

  • fonts.scss: SCSS partial containing font-related styles.

  • layout.scss: SCSS partial containing layout-related styles.

  • reset.scss: SCSS partial containing CSS reset styles.

  • darkModeToggle.scss: SCSS partial containing styling for the dark mode toggle.

  • main.ts: TypeScript file containing logic for the calculator operations.

  • README.md: Documentation file providing information about the calculator app.