2010年9月24日 星期五

2010/9/24作業 99乘法表

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {  
            int[,] arr1=new int [101,101];
            int sum = 0;
           
            for (int i = 1; i <= 9; i++)
            {
                for (int j = 1; j <= 9; j++)
                {
                    sum =i*j;
                    arr1[i, j] = sum;
                   
                }
            }
            for (int i = 1; i <= 9; i++)
            {
                for (int j = 1; j <= 9; j++)
                {
                  
                    Console.WriteLine("i=" + i + "j= " + j);
                    Console.WriteLine("" + i + "*" + "" + j + "=" + arr1[i, j]);
                }
            }


        }
    }
}

沒有留言:

張貼留言