精慕门6454581
2017-10-10 19:31
请问答案在哪找
同学代码呀
o.....o
.o...o.
..o.o..
...o...
..o.o..
.o...o.
o.....o
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
for(int h=1;h<=7;h++)
{
for(int l=1;l<=7;l++)
{
if(l==h||l==8-h)
Console.Write("o");
else
Console.Write(".");
}
Console.WriteLine("");
}
}
}
}
C#开发轻松入门
255672 学习 · 1524 问题
相似问题