Pemrograman Java Script
Sintak Java Script::>>>>
<html>
<head>
<title>No. 1</title>
</head>
<body>
<script type="text/javascript">
<!--
var input=8;
var kolom;
var baris;
for(kolom=1;kolom<=input;kolom++)
{
for(baris=1;baris<=kolom;baris++)
{
document.write("*");
}
document.write("</br>");
}
for(baris=input-2;baris>=0;baris--)
{
for(kolom=input;kolom>=input-baris;kolom--)
{
document.write("*");
}
document.write("</br>");
}
//-->
</script>
</body>
</html>
Hasil Sintak
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar