用C#输出9*9口诀表
用C#输出9*9口诀表
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _02
{
class Program
{
static void Main(string[] args)
{
string s = "";
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= i; j++)
{
s += string.Format("{0,1}X{1,1}={2,-4}", j, i, j * i);
}
s += "\r\n";
}
Console.Write(s);
Console.ReadKey();
}
}
}