Created
July 26, 2022 08:32
-
-
Save pratikdevdas/abeba376502de556f80e5d418d9fe547 to your computer and use it in GitHub Desktop.
Mathematics with js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x1, y1, x2, y2, result; | |
x1 = prompt('x1'); | |
y1 = prompt('y1'); | |
x2 = prompt('x2'); | |
y2 = prompt('y2'); | |
result = Math.sqrt(Math.pow((x2 - x1),2)+Math.pow((y2 - y1),2)); | |
console.log(result.toFixed(4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment