填空题
下面程序的功能是:计算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\n",a); printf("奇数之和=%d\n",c-11);}
【参考答案】
b=i+1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
阅读下列程序,则程序的输出结果为______。#include stdio.h struet ty{ int data;char c;};main( ){ street ty a={30,’x’};fun(a);printf( %d%c ,a.data,a.c);}fun(struct ty b){ b.data=20;b.c=’y’;}
点击查看答案&解析
填空题
设有以下定义和语句,则*(*(p+2) +1) 的值为______。int a[3][2]={10,20,30,40,50,60},(*p) [2];p=a;
点击查看答案&解析
相关试题
以下程序的运行结果是______。#incl...
以下程序中函数f的功能是在数组x的n个数(...
以下程序的输出结果是______。#incl...