using System; namespace ConsoleApplication { class Program { static void Main(string[] args) { //int[] a=new int[3]; //一维数组 int[,] a = new int[3,3]; for (int i = 0; i < 3;i++ ) { for (int j = 0; j < 3;j++ ) { a[i,j] = i + j; Console.Write(a[i, j]); Console.Write(" "); } Console.WriteLine(); } Console.Read(); } } }
时间: 2024-09-29 19:31:13