09-循环

1. while 同 C++

2. for 同 C++

3. foreach,注意数组的定义

        int[] fibarray = new int[] { 0, 1, 1, 2, 3, 5, 8, 13 };
        foreach (int element in fibarray)
        {
            System.Console.WriteLine(element);
        }

  

猜你喜欢

转载自www.cnblogs.com/alexYuin/p/9067509.html