using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _1001_for循环输出等腰三角形
{
class Program
{
static void Main(string[] args)
{
//循环产生10个列
for (int i = 1; i <= 10;)
{
//使用空格调整三角形位置
for (int j = 10; j > i; j--)
{
Console.Write(" ");
}
//循环产生10个行
for (int k = 0; k < i;)
{
//加空格使三角形变大
Console.Write("* ");
k++;
}
Console.WriteLine();
i++;
}
Console.ReadLine();
}
}
}
如上描述如有不懂,或想学习更多技术知识,可以扫码关注麒琳技术栈公众号,欢迎在线咨询