<meta charset="utf-8">
<?php
function out($fun,$num){
for($i=0;$i<=$num-1;$i++){
$fun($i,$num);
echo "<br>";
}
}
function in($i,$num){
for($j=1;$j<$num-$i;$j++){
echo " ";
}
for($k=0;$k<2*$i+1;$k++){
echo "*";
}
}
out("in",6);
时间: 2024-11-08 20:15:31