Copy code The code is as follows:
//Yang Hui Triangle
for ($i=6; $i >= 0;$i--)
{
for ($j=$i;$j <= 6;$j++)
{
if ($j < = 6-1)
{
echo "a";
}else
{
echo "
";
}
}
}
?>
PHP printing Yang Hui triangle customization
Copy code The code is as follows:
http://www.bkjia.com/PHPjc/323807.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323807.htmlTechArticleCopy the code code as follows: ?php //Yang Hui Triangle for ($i=6;$i = 0;$ i--) { for ($j=$i;$j = 6;$j++) { if ($j = 6-1) { echo "ba/b"; }else { echo "br /"; } } } ? PHP print Yang Hui triangle custom...