编程输出九九乘法表

时间:2022-08-16 19:36:38

编程输出九九乘法表

 

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Text;
 5 using System.Threading.Tasks;
 6 
 7 namespace 贴吧02
 8 {
 9     class Program
10     {
11         static void Main(string[] args)
12         {
13             int i;
14             int k;
15             int j = 0;
16             for (i = 1; i < 10; i++)  //i*k
17             {
18                 j++;
19                 for (k = 1; k <= j; k++)
20                 {
21                     Console.Write("{0}*{1}={2}  ", i, k, i * k);
22                 }
23                 Console.WriteLine();
24             }
25             Console.ReadKey();
26         }
27     }
28 }