using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
/* int sum = 0;
int[] arr1 = new int[101];
int k;
for (int i = 1; i <= 100; i++)
{
sum = sum + i;
Console.WriteLine("i=" + i);
Console.WriteLine("sum=" + sum);
arr1[i] = sum;
}
*/
int[,] arr2 = new int[10, 10];
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= 9; j++)
{
arr2[i, j] = i * j;
Console.WriteLine();
Console.WriteLine("i=" + i + "j=" + j);
}
}
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= 9; j++)
{
Console.WriteLine("arr[{0},{1}]={2}",i,j,arr2[i,j]);
}
}
}
}
}
沒有留言:
張貼留言