关键代码:
internal class Program
{
static void Main(string[] args)
{
//for语句:控制台打印输出九九乘法表
for (int i = 1; i <=9; i++)
{
for (int j = 1; j <=i; j++)
{
Console.Write("{0}x{1}={2}", j, i, j * i);
}
Console.WriteLine();
}
Console.ReadKey();
}
}
评论