From 859298c8abc5acc937045807dfa8925e07726b54 Mon Sep 17 00:00:00 2001 From: Sajith Minrutha <66878264+SajithMinrutha@users.noreply.github.com> Date: Sat, 7 Oct 2023 07:52:16 +0530 Subject: [PATCH] Create 83A7SP.js Signed-off-by: Sajith Minrutha <66878264+SajithMinrutha@users.noreply.github.com> --- 83lv6T/83A7SP.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 83lv6T/83A7SP.js diff --git a/83lv6T/83A7SP.js b/83lv6T/83A7SP.js new file mode 100644 index 0000000..a7eff5b --- /dev/null +++ b/83lv6T/83A7SP.js @@ -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}`);