![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
执行以下程序s=0 for i in range(1,5,-1): s+=i print(s),输出结果为()
A.0
B.10
C.15
D.1
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)
A.0
B.10
C.15
D.1
A.1 2
B.123 0
C.1 23
D.0 0
若有以下程序: main() { int a[4][4]={{l,2,-3,-4},{0,-12,-13,14},{-21,23,0,-24}, {-31,32,-33,0}}; int i,j,s=0; for(i=0; i<4; i++ ) { for(j=0; j<4; j++ ) { if (a[i][j]<0) continue; if (a[i][j]==0) break; s+=a[i] [j]; } } printf("%d\n",s); } 执行后输出的结果是【 】。
若有以下程序 main() { int a[4][4]={{1,2,-3,-4},{0,-12,-13,14},{-21,23,0,-24},{-21,32,-33,0}}; int i,j,s=0; for(i=0;i<4;i++) {for(j=0;j<4;j++) { if(a[i][j]<0)continue; if(a[i][j]==0)break; s+=a[i][j]; } } printf("%d\n",s); } 执行后输出结果是【 】。
若输入I have a test.,则以下程序的运行结果为【 】。 include<stdio.h> main() { FILE*fp; char str[100],filename[10]; int i=0; if ((fp=fopen("test","w"))==NULL) { printf("can not open the file!\n"); exit(0); } getchar(); gets(str); while(str[i]!=) { if (str[i]>=a && str[i]<=z) str[i]=str[i]-32; fputc(str[i],fp); i++; } fclose(fp); fp=fopen("test","r"); fgets(str,strlen(str)+1,fp); printf("%s\n",str); fclose(fp); }
程序执行结果S的值是【 】。 Private Sub Command1_Click() i=0 Do i=i+1 s=i+s Loop Until i>=4 Print s End Sub
有下列程序: main() {inti,s=0,t[]={1,2,3,4,5,6,7,8,9}; for(i=0;i<9;i+=2)s+=*(t+i); printf(%d\n,s); } 程序执行后的输出结果是
A.20
B.45
C.36
D.25
A.自然数1~10的累加和
B.自然数1~10中的偶数之和
C.自然数1~9中的奇数之和
D.自然数1~9的累加和