填空题

下面程序是计算100以内能被4整除且个位数为4的所有整数,请填空。
main()
int m,n;
for(m=0; 【9】 ;m++)
n=m*10+4;
If( 【10】 )continue;
printf("%d\n",n);

【参考答案】

[9]m<10
[10]n%4!=0
<上一题 目录 下一题>
热门 试题

填空题
若有如下程序: #include stdio.h main() char s[30]; strcpy(&s[0], abc ); strcpy(&s[1], de ); strcpy(&s[2], f ); printf( %s n ,s); 则程序运行后的输出结果是 【7】 。
填空题
以下程序从终端输入一行字符放在s数组中,输入以回车符作为结束,函数fun统计存放在s数组中每个数字字符的个数。形参ch指向s数组,形参n给出了s数组中字符的个数。在acc数组中用下标为0的元素统计字符“0”的个数,下标为1的元素统计字符“1”的个数,…。请填空。 #include <stdio.h> void fun(int *,char*,int); main() char s[80],c; int acc[10],i=0; printf( Enter characters: n ); while((c=getchar())!=’ n’)s[ 【11】 ]=c; fun( 【12】 ); for(i=0;i<10;i++)printf( %c:%d n ,’0’+i,acc[i]); printf( n n ); void fun(int *a,char *ch,int n) int i,d; for(i=0;i<10;i++)a[i]= 【13】 ; for(i=0;i<n;i++) d= 【14】 ; a[d]++;
相关试题
  • 下面函数用来求两个单精度数之和,并通过形...
  • 以下函数把b字符串连接到a字符串的后面,并...