namespace 九九乘法口诀 { class Program { public void koujue() { for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i; j++) { Console.Write(j + "*" + i + "=" + j * i + " "); } Console.WriteLine(); } } static void Main(string[] args) { Program hanshu = new Program(); //九九口诀表,一行一行的打印 //for (int i = 1; i <= 9; i++) //{ // for (int j = 1; j <= i; j++) // { // Console.Write(j + "*" + i + "=" + j * i + " "); // } // Console.WriteLine(); //} hanshu.koujue(); Console.ReadLine(); } } }