问答详情
源自:4-10 编程练习

我这错哪里了?

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<=7;x++)
                {
                    if(x=y||x+y=8)
                    {
                        Console.Write("0");
                    }
                    else
                    {
                        Console.Write(".");
                    }
                }
                Console.WriteLine();
            }
            //请完善代码
           
        }
    }
}


提问者:慕虎0550642 2016-11-04 23:22

个回答

  • 花繁琴瑟
    2016-11-05 07:33:11
    已采纳

    if判断那里应该是if(x==y||x+y==8),=是赋值而==是判断