answersLogoWhite

0

<html>

<head>

<script language="JavaScript">

function TriaAngle (base, height)

{

document.write("the area of the triangle is" +1/2*base*height)

}

</script></head>

<body>

<script language ="JavaScript">

var b=(prompt ("enter the base of the triangel"))

var h=(prompt ("enter the height of the triangle"))

TriaAngel (b,h)

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

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
JudyJudy
Simplicity is my specialty.
Chat with Judy
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa

Add your answer:

Earn +20 pts
Q: Javascript code for the area of a triangle?
Write your answer...
Submit
Still have questions?
magnify glass
imp