代码在屏幕上撒掉一颗钻石????????? [英] Code to drwa a diamond on the screen??????

查看:65
本文介绍了代码在屏幕上撒掉一颗钻石?????????的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力做到自己,并完成了以下代码


I m trying to do my self and done the following code


function MakeDiamond()
{
    //echo "In function";
    for($i=20;$i>0;$i--)
    {
            //echo "In loop1";
        for($j=0;$j<$i;$j++)
        {
            //echo "In lop2";
            for($h=0;$h<5;$h++)
            {
            echo "&nbsp;";
            }

        }

            echo "*<br>";
    }

    for($i=0;$i<20;$i++)
    {
            //echo "In loop1";
        for($j=0;$j<$i;$j++)
        {
            //echo "In lop2";
            for($h=0;$h<5;$h++)
            {
            echo "&nbsp;";
            }

        }

            echo "*<br>";
    }





此代码绘制
圆的一侧,然后反转另一半,也会在上半部下方绘制bt.



请不要侮辱我您的善良答案.

关心

Ehsan





this code draw
one side of the circle and by reversing this another half also draw bt under the first half.



plz dont insult me with ur Kind answer.

regard

Ehsan

推荐答案

i = 20 ;


i> 0 ;
i>0;


i--) { // 回显"In loop1"; for (
i--) { //echo "In loop1"; for(


这篇关于代码在屏幕上撒掉一颗钻石?????????的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆