问答题
#include<stdio.h> main() { int a[3][2]={{1,2},{3,4},{5,6}),i,j,s=0; for(i=1;i<3;i++) for(j=0;j<2;j++) s+=a[i][j]; printf("%d\n",s); }
【参考答案】
18[解析] #include<stdio.h> main() { int a[3][2]={1,2},{3,4......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
<上一题
目录
下一题>
热门
试题
问答题
采用递归调用的算法编写一个计算x的n次方的函数(不用写主函数调用)。
点击查看答案
填空题
下列给定程序中,函数fun()的功能是:读人一个字符串(长度<20),将该字符串中的所有字符按ASCⅡ码降序排序后输出。 #include<stdio.h> void fun(char t[]) { char c; int i,j; for(i=0;______;i++) *第一空* for(j=i+1;j<=strlen(t);j++) if(______) *第二空* { c=t[j]; t[j]=t[i]; t[i]=c; } } main() { char s[81]; printf( Please enter a character string: n ); gets(s); printf( n nBefore sorting: n%s ,s); ______; *第三空* printf( nAfter sorting decreasingly: n%s n ,s); }
点击查看答案&解析
相关试题
下面程序是将字符串P中的所有字符复制到字...
求出10到500之内能同时被3、7整除的...
#include<stdio.h> main() {int ...