-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path23_length_height.html
28 lines (26 loc) · 952 Bytes
/
23_length_height.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rectangle Length and Width</title>
<script>
var length = prompt("Length: ");
length = parseFloat(length);
var height = prompt("Height: ");
height = parseFloat(height);
var perimeter = (length *2) + (height *2);
perimeter = parseInt(perimeter);
var area = (length * height)
document.write("<h1>" + "Calculate the Perimeter of Rectangle" + "</h1>");
document.write("<h3>" + "Length of Rectangle: " + length + "</h3>")
document.write("<h3>" + "Height of Rectangle: " + height + "</h3>")
document.write("<h3>" + "Perimeter of Rectangle: " + perimeter + "</h3>")
document.write("<h3>" + "Area of Rectangle: " + area + "</h3>")
</script>
</head>
<body>
<main>
<h1>Thanks for using the Area and Perimeter application!</h1>
</main>
</body>
</html>