数组,输出5行3列

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Exerice1
{
   public class Program
    {
     public  static void Main(string[] args)
        {
            int[] count = new int[15] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    Console.Write(count[i * 3 + j]+" ");
                }
                Console.WriteLine();
            }
            Console.ReadKey();
        }
    }
}

posted @ 2011-04-12 13:46  杀 手  阅读(506)  评论(1编辑  收藏  举报