Share My Brain
Pages
Home
Computer
Networking
Tips
Tugas
Monday, April 25, 2011
Segitiga Bintang
Script Perulangan 1
for($i = 1; $i <= 5; $i++)
{
for($j = 5; $j >= $i; $j--)
{
echo "* ";
}
echo "
";
}
?>
Script Perulangan 2
for($i = 1; $i <= 5; $i++)
{
for($j = 1; $j <= $i; $j++)
{
echo "* ";
}
echo "
";
}
?>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment