填空题
下面程序的功能是:计算1~10之间的奇数之和与偶数之和,请填空。
#include<stdio.h>
main()
int a,b,c,i;
a=c=0;
for(i=0;i<=10;i+=2)
a+=i;
______;
c+=b;
printf("偶数之和=%d",a);
printf("奇数之和=%d",c-11);
【参考答案】
b=i+1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序运行后的输出结果是______。 #include<stdio.h> typedef struct int num; double s; REC; void fun1(REC x)x.num=23; x.s=88.5; main() REC a=16, 90.0; fun1(a); printf( %d n , a.num);
点击查看答案&解析
填空题
已有定义如下: struct node int data; struct node *next; *P; 以下语句调用malloc函数,使指针p指向一个具有struct node类型的动态存储空间。 请填空。 p=(struct node *)malloc______;
点击查看答案&解析
相关试题
当输入为“quert”时,下面程序的执行结果...
下列叙述中错误的是( )。
下列程序的执行结果是______。 #in...
下列数据中,不合法的C语言实型数据是
以下程序的输出结果是_______。 #...