C语言中期复习与练习
发布时间
阅读量:
阅读量
在下列程序代码中,printf("x");这一语句被执行的次数为:(5)
#include <stdio.h>
int main()
{ int x=0,y=10;
while(x<y)
{ x++;y--;
printf("x");
}
return 0;
}
- 当输入数值234时,该程序执行后的输出结果为:(44556)
void main()
{ int c;
while((c=getchar())!='\n')
{ switch(c-'2')
{ case 0:
case 1:putchar(c+2);
case 2:putchar(c+2);break;
case 3:putchar(c+1);
case 4:putchar(c+1);break;
}
}
}
- 在下列程序代
全部评论 (0)
还没有任何评论哟~
