Saturday, February 18, 2012

Latihan 4

<HTML>
<HEAD>
<TITLE>Keliling Lingkaran</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE = "JavaScript">
<!--
function kl(r)    {
var phi = 3.14;
var hasil = 2 * phi * r;
return(hasil);
}
var x = parseInt(prompt("Ketikan Jari-Jari Lingkaran = \n Ingat Jangan String"));
var z = kl (x);
document.write(z);
//-->
</SCRIPT>
</BODY>
</HTML>

No comments:

Post a Comment