为了账号安全,请及时绑定邮箱和手机立即绑定

为什么有错误

using System;

using System.Collections.Generic;

using System.Text;


namespace Test

{

    class Program

    {

        static void Main(string[] args)

        {

            for (int y = 1; y <= 7; y++)

            {

                for (int x = 1; x <= y; x++)

                {

                    Console.Write(x);

                }

                Console.WriteLine();//换行

            }

        }

    }

}


正在回答

1 回答

namespace Test

{

    class Program

    {

        static void Main(string[] args)

        {

            for (int x=1;x<=7;x++)//请完善代码

            {

                for (int y=1;y<=7;y++)

                {

                    if (x==y||x+y==8)

                    {

                        Console.Write("o");

                    }

                    else

                    {

                        Console.Write(".");

                    }

                    Console.WriteLine();

                }

            }

            

        }

    }

}


0 回复 有任何疑惑可以回复我~
#1

曾小妍 提问者

非常感谢!
2016-06-04 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
C#开发轻松入门
  • 参与学习       251707    人
  • 解答问题       1448    个

本门课程是C#语言的入门教程,将带你轻松入门.NET开发

进入课程

为什么有错误

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信