Make your own free website on Tripod.com

~~~Chao Li~~~

~Kumo no Mukou, Yakusoku no Basho~

 
~~~~

<html>
<head>
<title>Area and Perimeter<title>
</head>

<body>
<script>
//Chao Li. September 26, 2007.

alert ("So, we are going to find out the area and perimeter of a rectangle.");

var length = "";
var width = "";
var area = 0;
var perimeter = 0;

length = prompt ("What is the length of the rectangle?");
width = prompt ("And the width?");

length = eval(length);
width = eval(width);

area = length * width;
alert ("The area of the rectangle will be "+area+".");

perimeter = 2 * (length + width);
alert ("And your perimeter will be "+perimeter+".");

alert (Bye bye.);

</script>
</body>
</html>

 
 
 
~~~~