Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Create 83A7SP.js #1548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions 83lv6T/83A7SP.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function calculateHypotenuse(a, b) {
return Math.sqrt(a * a + b * b);
}

// Example usage:
const sideA = 3;
const sideB = 4;
const hypotenuse = calculateHypotenuse(sideA, sideB);
console.log(`The hypotenuse of the right triangle is ${hypotenuse}`);