marcilustra / Marbacus

A simple HTML CSS and JS Calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marbacus

A simple HTML CSS and JS Calculator.
It is slowly becoming a game to see how many languages I can make it in.
The name is a play on Marc and Abacus. (poorly done).

Navigation

  1. HTML VERSION
    a. Mark 1
    b. Mark II
    c. Mark III
  2. VB Version
    a. Mark 1

HTML Version

Mark III

This time we propose a calculator that can perform calculations on Binary numbers and perhaps, more. Allowing for different themes depending on the user's choice. image Background Photo by Pramod Tiwari on Unsplash

image Background Photo by rishi on Unsplash

image Background Photo by ÉMILE SÉGUIN ✳️✳️✳️ on Unsplash

Mark II

First major change from Mark I is the theme. Mark II uses a light blue theme with a glowing cyan display that has two levels.

Top label displays the value of the current operation being carried out. Bottom label displays 0 by default, the current input, and result of a completed operation, valid or invalid with a corresponding error message. image

The Buttons

Delete and AC

image

DEL removes the last character of the bottom display and sets its to zero if the last character is deleted as well.

The Numbers

Append numbers to the bottom text I/O image

The Operators

  1. Add
    image

  2. Subtract
    image

  3. Multiply
    image

  4. Divide
    image

  5. Exponentiate
    image

  6. Square root(disabled)
    image \

Before an operation is carried out the calculaot check first if there is a previous one being undertaken and calls for evaluation before the operand is appended to the top label output.

Mark 1

Uses eval() (semi-safely since all input is restricted to only numbers and operator strings but not entirely: you can Ctrl + V invalid inputs) image

Operations availbale: 1. Add 2. Subtract 3. Multiply 4. Divide

VB Version

Mark I(VB)

Borrows directly from Mark II of the HTMl version and is functionally identical to it with one exception.
image
Divide by zero is caught by a check and terminates the program after giving the user a message to discourage them from doing it again.
image \

About

A simple HTML CSS and JS Calculator


Languages

Language:Visual Basic .NET 48.1%Language:CSS 23.5%Language:JavaScript 16.7%Language:HTML 11.7%