How can I create a pyramid from using php?

前端 未结 14 1254
耶瑟儿~
耶瑟儿~ 2020-12-11 08:58

I need to create a pyramid using asterisks. I specify a value which becomes the base of the pyramid. The base contains as much asterisks as the value specified and the pyram

14条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 09:37

    0; $j--)
    
                      echo $j;
    
    
    
    
    
                for($k=1; $k<=$i; $k++)
    
                            echo " ";
    
    
    
    
    
    
        echo "
    "; } ?>

提交回复
热议问题