代码实例
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
int iRow, iColumn;//定义行数和列数
for (iRow = 1; iRow < 10; iRow++)
{
for (iColumn = 1; iColumn <= iRow; iColumn++)//列数循环
{
//输出每一行的数据
Console.Write("{0}*{1}={2} ", iColumn, iRow, iRow * iColumn); //占位符
}
Console.WriteLine();//换行
}
Console.ReadLine();
}
}
}