填空题

以下程序运行后的输出结果是 【18】 。
#include <stdio.h>
main()
int i,m=0,n=0,k=0;
for(i=9;i<=11;i++)
switch(i/10)
case 0: m++;n++;break;
case 10: n++;break;
default: k++;n++;

printf("%d%d%d\n",m,n,k);

【参考答案】

1 3 2
<上一题 目录 下一题>
热门 试题

填空题
以下程序运行后的输出结果是 【19】 。(注:如果结果中含有回车,可加一空格写在一行,例如: 1 1 1 1 1 1 1 1 1可以写成:1 1 1 1 1 1 1 1 1。 #include <stdio.h> mala() int i,j,a[][3]=1,2,3,4,5,6,7,8,9; for(i=0;i<3;i++) for(j=i+1;j<3;j++) a[j][i]=0; for(i=0;i<3;i++) for(j=0;j<3;j++) printf( %d ,a[i][j]); printf( n );
填空题
以下程序运行后的输出结果是 【20】 。 #include <stdio.h> fun(int x) if(x 2>0) fun(x 2); printf( %d ,x); main() fun(6);
相关试题
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序段: main() int a=5,*...
  • 有以下程序: #include <stdio.h> ...
  • 有以下程序: #include <stdio.h> m...