美文网首页
等腰三角

等腰三角

作者: chychychychy | 来源:发表于2018-12-26 16:32 被阅读0次

    try

    {

    int num = Convert.ToInt32(Console.ReadLine());

    for (int i = 1; i <= num; i++)

    {

    for (int j =0; j < num-i; j++)

    {

    Console.Write(" ");

    }

    for (int j = 0; j < 2 * i - 1; j++ )

    {

    Console.Write("*");

    }

    Console.WriteLine();

    }

            }

            catch

            {

            }

            Console.ReadKey();

    相关文章

      网友评论

          本文标题:等腰三角

          本文链接:https://www.haomeiwen.com/subject/ieahlqtx.html