循环嵌套联系 Day0815

/*    1

*  21

*  321

* 4321

*54321

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

{                  

                    for (int j = 1; j <= 5 - i; j++)

                      { Console.Write(" ");}

                    for (int k = i; k >= 1; k--)

                        {Console.Write(k);}

Console.WriteLine();

}


//九九乘法表

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

{

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

                {        Console.Write("{0}*{1}={2}\t",j,i,j*i);    }

               Console.WriteLine();

}

你可能感兴趣的:(循环嵌套联系 Day0815)