Skip to content

A website to calculate the result of some mathematical formulas quickly

Notifications You must be signed in to change notification settings

Rodrigo-07/mathformulas

Repository files navigation

MATHFORMULAS

MathFormulas

It is a website to calculate the result of some mathematical formulas quickly.

 

Description:

This is my final project for CS50 Course. I used only HTML, CSS and JavaScript to create this website. No library or framework was used. At moment(10/31/2021) you can calculate the result of a quadratic equation, the the hypotenuse and cathetuses of a right triangle, and 2 percentage calculation situations.

 

Website pages

Quadratic Formula

On this page, you can calculate the x values of a quadratic equation.

Quadratic formula _1

Just add the values of the a, b, c following the general formula. After that, is just to click on "calculate" and answer will appear bellow,

Quadratic formula _2

It does not calculate complex numbers, so if your quadratic equation results are complex numbers, the answer will be "x1 and x2 are complex numbers!"

Pythagorean Theorem

On this page, you can calculate the hypotenuse and cathetuses of a right triangle.

Pythagorean_Theorem1

  • a = Opposite cathetus
  • b = Adjacent cathetus
  • c = Hypotenuse

To use just add the values that you have and leave the value you want to find in black.

Pythagorean_Theorem2

Percentage

On this page, you can calculate percentage in two different situations.

Percentage1

To use, just add the values and click on "calculate"

Percentage2

 

Website code

HTML

In the main folder, there are 3 html files:

  • index.html This is the main page and where you can calculate the x values of a quadratic equation.

  • percentage.html Here you can calculate "What is x % of y ?" and "x is what % of y ?"

  • pythagorean_theorem.html Here you can calculate the hypotenuse and cathetus of a right triangle

The content of each file is the html code of the respective page.

CSS

In the CSS folder, there is 3 files:

  • style.css This is the CSS code for the index page.

  • style2.css This is the CSS code for the Pythagorean Theorem page.

  • style4.css This is the CSS code for the percentage page.

Most of the times I used CSS id Selector.

JavaScript

In the JS folder, there is 3 files:

  • script1.js This is the JS code for the index page.

  • script2.js This is the JS code for the Pythagorean Theorem page.

  • script4.js This is the JS code for the percentage page. Here I used 2 fuctions, one for each type of percertage.

To get values of the variables from the HTML pages, I used document.getElementById

This was my CS50 final project!

About

A website to calculate the result of some mathematical formulas quickly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published