- #include<stdio.h>
- intmain()
- {
- intx=1;
- inty=0;
- intz;
- switch(x)
- {
- case1:
- switch(y)
- {
- case0:
- printf("%*d",2,1);
- case1:
- printf("%#o",10);
- }
- case2:
- switch(y)
- {
- case0:
- scanf("%3d",&z);//如果有输入,输入45678
- printf("%d",z);
- break;
- case1:
- printf("%d",4);
- }
- }
- }
输出1012 456
摘自:韩山师范学院 天涯网友的测试题