-
Notifications
You must be signed in to change notification settings - Fork 75
basic #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
basic #14
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,80 +1,80 @@ | ||
| // Basic math formulaas | ||
| function addition(num1, num2){ | ||
| return -1; | ||
| return num1 + num2; | ||
| } | ||
|
|
||
| function subtraction(num1, num2){ | ||
| return -1; | ||
| return num1 - num2; | ||
| } | ||
|
|
||
| function multiplication(num1, num2){ | ||
| return -1; | ||
| return num1 * num2; | ||
| } | ||
|
|
||
| function division(num1, num2){ | ||
| return -1; | ||
| return num1 / num2; | ||
| } | ||
|
|
||
| // Area formulaas | ||
| function areaSquare(side){ | ||
| return -1; | ||
| return side * side; | ||
| } | ||
|
|
||
| function areaRectangle(length, width){ | ||
| return -1; | ||
| return length * width; | ||
| } | ||
|
|
||
| function areaParallelogram(base, height){ | ||
| return -1; | ||
| return base * height; | ||
| } | ||
|
|
||
| function areaTriangle(base, height){ | ||
| return -1; | ||
| return .5 * (base * height); | ||
| } | ||
|
|
||
| function Circle(radius){ | ||
| return -1; | ||
| return 3.14 * (radius * radius); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's better practice to use |
||
| } | ||
|
|
||
| function Sphere(radius){ | ||
| return -1; | ||
| return 4 * 3.14 * (radius * radius); | ||
| } | ||
|
|
||
| // Surface Area formulas | ||
| function surfaceAreaCube(side){ | ||
| return -1; | ||
| return 6 * (side * side); | ||
| } | ||
|
|
||
| function surfaceAreaCylinder(radius, height){ | ||
| return -1; | ||
| return 2 * 3.14 * radius * height; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong equation (-1) |
||
| } | ||
|
|
||
| // Perimeter formulas | ||
| function perimeterSquare(side){ | ||
| return -1; | ||
| return 4 * side; | ||
| } | ||
|
|
||
| function perimeterRectangle(length, height){ | ||
| return -1; | ||
| return (2 * length) + (2 * height); | ||
| } | ||
|
|
||
| function perimeterTriangle(side1, side2, side3){ | ||
| return -1; | ||
| return side1 + side2 + side3; | ||
| } | ||
|
|
||
| function perimeterCircle(diameter){ | ||
| return -1; | ||
| return 3.14 * diameter; | ||
| } | ||
|
|
||
| // Volume formulas | ||
| function volumeCube(side){ | ||
| return -1; | ||
| return side * side * side; | ||
| } | ||
|
|
||
| function volumeRectangular(length, width, height){ | ||
| return -1; | ||
| return length * width * height; | ||
| } | ||
|
|
||
| function volumeCylinder(radius, height){ | ||
| return -1; | ||
| return 3.14 * (radius * radius) * height; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 94% Great job! |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use
Math.PI(-5)