编程学习网为您整理以下代码实例,主要实现:C语言嵌套的switch语句,希望可以帮到各位朋友。
#include <stdio.h>
int main () {
/* local variable deFinition */
int a = 100;
int b = 200;
switch(a) {
case 100:
printf("This is part of outer switch\n", a );
switch(b) {
case 200:
printf("This is part of inner switch\n", a );
}
}
printf("Exact value of a is : %d\n", a );
printf("Exact value of b is : %d\n", b );
return 0;
}
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!