Program for Finding the area of triange in js



<html>
<head>
 <title>Area of Triangle</title>
</head>
<style>
h3 {
font-family:arial;
};
</style>
<body>
 <script>
var base = parseInt(prompt("Enter width of Triangle : "));
var height = parseInt(prompt("Enter height of Triangle : "));
var solving_triangle = (base * height)/2;

document.write("<br>");
document.write("<h3> Area of Triangle</h3>");
document.write("<font face='arial' size='3'>")
document.write(" The Width of Triangle is " + base + ".</font><br>");
document.write("<font face='arial' size='3'>")
document.write(" The Height of Triangle is " + height + ".</font><br><br>");
document.write("<font face='arial' size='3'>")
document.write(" The Area of Triangle is " + solving_triangle + ".</font>");
document.write("<h3> End of Program </h3>");
</script>
</body>
</html>

1 Comments