请问4-10编程练习
0......0
.0...0.
..0.0..
...0...
..0.0..
.0...0.
0.....0
这个答案应该是什么?
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
for(int i = 1;i<=7;i++)
{
for(int j = 1;j<=7;j++){
if(i==j||i+j==8)
{
Console.Write("O");
}else{
Console.Write(".");
}
}
Console.WriteLine();
}
}
}
}