CLICK HERE FOR THOUSANDS OF FREE BLOGGER TEMPLATES »

Cari Blog Ini

Jumat, 11 September 2009

Contoh Script season tiga =)

* Foreach

Scriptnya:
";

foreach ($klub as $nilai)
{
print "$nilai
";
}
?>


* For



Scriptnya:

"; } $bila = 5; $pola = 1; print "
Bilangan ganjil antara 5 sampai 25
";
for ($pola=1; $pola<10; style="font-weight: bold;">



* Aritmatika


Scriptnya:

"; print "Nilai \$nilai1=$nilai1 dan \$nilai2=$nilai2 "; print "\$nilai1 + \$nilai2 = $jumlah "; print "\$nilai1 - \$nilai2 = $kurang "; print "\$nilai1 * \$nilai2 = $kali <:br>"; print "\$nilai1 / \$nilai2 = $bagi "; print "\$nilai1 % \$nilai2 = $sisa "; ?>

0 komentar: