练习2014102205

/********************************************************************
@date     2014-10-22
@author   Tiger
@brief    语法
@details  C# 交错数组
********************************************************************/
using System;

class Demo
{
    static void Main()
    {
        int[][] arr = new int[3][];
        arr[0] = new int[2] { 1, 2 };
        arr[1] = new int[3] { 2, 3, 4 };
        arr[2] = new int[2] { 6, 7 };

        for (int i = 0; i < 3; ++i)
        {
            foreach (int elem in arr[i])
            {
                Console.Write(elem + " ");
            }
            Console.WriteLine();
        }
        Console.ReadLine();
    }
}
时间: 2024-10-13 08:21:04

练习2014102205的相关文章