? ??????????????Oh These Girls? ????? ?? ???Rating: 4.6 (8 Ratings)??4 Grabs Today. 1318 Total Grabs. ????
??Preview?? | ??Get the Code?? ?? ?????????????????????????????????Playboy? ????? ?? ???Rating: 3.7 (154 Ratings)??4 Grabs Today. 7355 Total Grabs. ??????Preview?? | ??Get the Code?? BLOGGER TEMPLATES AND TWITTER BACKGROUNDS ?

About Me

Foto saya
arema, east java, Indonesia
mboh....mboh...mboh....!!!!!!!!!!!!

Jumat, 11 September 2009

Aritmatika


Scriptnya:

<?php
$nilai1=32;
$nilai2=8;

$jumlah=$nilai1+$nilai2;
$kurang=$nilai1-$nilai2;
$kali=$nilai1*$nilai2;
$bagi=$nilai1/$nilai2;
$sisa=$nilai1%$nilai2;

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


For


Scriptnya:

<?php
for ($i = 1; $i <= 5; $i++) { print $i ."<br> "; } $bila = 5; $pola = 1; print " <br> Bilangan ganjil antara 5 sampai 25 <br>";
for ($pola=1; $pola<10; style="font-weight: bold;">Foreach
Scriptnya:
<?php
$klub = array ("Persik Kediri", "Persebaya Surabaya", "PSIS Semarang", "Persipura Jayapura");

print "Klub-klub yang pernah juara Liga Indonesia :<br>";

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