韶华将逝,雄心未已;欲与众君,共习此技.
圣诞树
上一篇 / 下一篇 2007-07-12 13:00:47 / 天气: 晴朗 / 心情: 平静 / 个人分类:PHP & MySQL
相关阅读:
- 这不是我的博客 (etng, 2007-7-05)
- 今天小受打击,不过还好 (dzjzmj, 2007-7-05)
- 正则表达式 (木頭, 2007-7-05)
- SOPHP蜘蛛抓取程序发布 (dzjzmj, 2007-7-05)
- Apache的ReWrite(1) (木頭, 2007-7-05)
- Apache的ReWrite(2) (木頭, 2007-7-05)
- php面试题 (phperwuhan, 2007-7-06)
- PHP实现多服务器session共享 (fengyun, 2007-7-10)
- smarty手册section (xiongxiaoming, 2007-7-10)
- [JS]Cookie精通之路 (phperwuhan, 2007-7-11)
-
引用 删除 1我喜 / 2007-09-23 22:47:56
-
评 5 分
真美啊啊啊啊
顶
-------------------------------------------------
http://www.sy555.com
-
引用 删除 小开 / 2007-07-16 17:09:09
-
我画的圣诞树:
<?php
$row=3; /* the number of rows in the first triangle */
$times=4; /* the number of triangles */
$rowinbole=5; /* the number of rows in the bole */
$middle=(2*$row-1+2*$times-2)/2; /* the position of the middle "*" in the last line of the last triangle */
for ($a=1; $a<=$times; $a++)
{ for ($i=1; $i<=$row; $i++)
{ print "<br />";
for ($k=$i; $k<$middle; $k++)
print ' ';
for ($j=$row+1-$i; $j<=$i+$row-1; $j++)
print "*";
print "\n";
}
$row++;
}
for ($a=1; $a<=$rowinbole; $a++)
{ print "<br />";
for ($i=1; $i<$middle-1; $i++)
print ' ';
for ($j=$middle-1; $j<=$middle+1; $j++)
print "*";
print "\n";
}
?>




