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("o");? ??
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? Console.Write(".");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();
? ? ? ? ? ? }//請完善代碼
? ? ? ? ? ??
? ? ? ? }
? ? }
}
2019-05-10
方便理解
2018-07-30
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("o");? ??
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? Console.Write(".");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();
? ? ? ? ? ? }//請完善代碼
? ? ? ? ? ??
? ? ? ? }
? ? }
}