134-while循环

语法结构
while(<test>){
<code to be looped>
}

使用while输出 1-9

            int index = 1;
            while (index<=9)
            {
                Console.WriteLine(index);//1 2  3 4 5 6 7 8 9
                index++;
            }
            Console.ReadKey();

  

posted @ 2018-11-16 15:48  阿晖2222  阅读(94)  评论(0编辑  收藏  举报