美文网首页
2018-12-20打印直角三角形 1. 需求说明 (1) .

2018-12-20打印直角三角形 1. 需求说明 (1) .

作者: 拾起_518 | 来源:发表于2018-12-20 10:27 被阅读0次

    try
    {
    int num = Convert.ToInt32(Console.ReadLine());
    for (int i = 0; i <= num; i++)
    {
    for (int j = 0; j < 2i-1; j++)
    {
    Console.Write("
    ");
    }
    Console.WriteLine(" ");
    }

            }
            catch
            {
               
            }
            Console.ReadKey();

    相关文章

      网友评论

          本文标题:2018-12-20打印直角三角形 1. 需求说明 (1) .

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