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.
- 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.
- 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.
- Clone or download the repository to your local machine.
- Open terminal and run npm install in the directory.
- Then run "npm run dev".
- open the local host link in the terminal.
- Enjoy using the simple calculator!
Demo : https://athishthayalan.github.io/calculator/
-
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.