代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace ConsoleApplication25
{
class Program
{
static void Main(string[] args)
{
string y = "";
for (int i = 12; i >= 8; i--)
{
//輸入前面的空格
for (int m = 1; m <= i; m++)
{
Console.Write(".");
}
//輸出后面的三角形
Console.Write("y");
if (i != 8)
{
y += "*";
Console.Write(y);
}
Console.Write("\n");
}
Console.ReadLine();}
}
}
轉載于:https://www.cnblogs.com/my021010/p/4701134.html
總結
- 上一篇: 军与纵队有什么区别?
- 下一篇: D - 小Y上学记——要迟到了!