标签:
1 #include<stdio.h> 2 int main() 3 { 4 int n=5; 5 switch(n){ 6 case 0:do{ 7 case 1:printf("1"); 8 case 2:printf("2"); 9 case 3:printf("3"); 10 case 4:printf("4"); 11 case 5:printf("5"); 12 default:n--; 13 }while(n>2); 14 } 15 printf("\n"); 16 return 0; 17 }
switch语句机制和goto语句相同(类似?),可以实现无条件跳转。——这是我能问到的比较靠谱的答案了。
1 goto Label; 2 do{ 3 Label: 4 printf("123"); 5 }while(0);
标签:
原文地址:http://www.cnblogs.com/suzyc/p/4489183.html