UTS-1.php
[php]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>UTS 1</title>
</head>
<body>
Masukan batas perulangan<br />
<form action="UTS-2.php" method="post">
<input type=text name='bil'/>
<input type = submit value="Jalankan"/>
</form>
</body>
</html>
[/php]
[php]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?
echo "Hasil Perulangan<br>";
$bil=$_POST['bil'];
$a=1;
$b=1;
echo $a."";
echo "1 ";
for ($urut= 1;$urut<=$bil;$urut++)
{
$a=$a+$b;
$b=Sa-$b+$a;
if ($a %2==1)
{
echo("<font color=red>$a</font>"." ");
}
else
if ($a %2==0)
{
echo("<font color=blue>$a</font>"." ");
}
}
?>
<br>
<a href="UTS-1.php">Kembali</a>
</body>
</html>
[/php]
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :