安忍不动如大地,静虑深思如秘藏
雄鹰虽然有时候飞的比鸡还低 但鸡永远也不可能飞到鹰的高度
我们来检测一下你对语法的认知程度

分析以下代码,猜测他的运算结果(我一直认为读代码是程序员必须的基本功,读狗屁代码更是基本功中的基本功)

我承认以下代码很狗屁,但也要请你来读一下
 1public static void Main(string[] args)
 2        {
 3            for (int i = 0; i < 1000; i++)
 4            {
 5                switch (i)
 6                {
 7                    case 1:
 8                        System.Console.WriteLine(i);
 9                        break;
10                    case 2:
11                        System.Console.WriteLine(i);
12                        break;
13                    case 50:
14                        do
15                        {
16                            if (i > 60)
17                            {
18                                break;
19                            }

20                            else
21                            {
22                                System.Console.WriteLine(i);
23                            }

24                            i++;
25                        }

26                        while (i < 70);
27                        break;
28                    default:
29                        while (i < 100)
30                        {
31                            i++;
32                            if (i < 80)
33                            {
34                                continue;
35                            }

36                            else
37                            {
38                                System.Console.WriteLine(i);
39                            }

40                        }
 break;
41                }

42            }

43        }
posted on 2007-01-31 09:16  害羞的狮子王  阅读(220)  评论(0编辑  收藏  举报