【单选题】以下程序的输出结果是()#includeintmain(void){inti;for(i=1;i<=10;i++){if(i%3==0)continue;if(i%7==0)break;printf(“%d”,i);}return0;}
A. 12345678910
B. 1245
C. 12456
D. 12457810
A. 12345678910
B. 1245
C. 12456
D. 12457810
举一反三
- 【单选题】下面程序执行后的输出结果是()。#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0; A. 10 B. 13 C. 21 D. 死循环
- 下面程序执行后的输出结果是()。#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;} A: 10 B: 13 C: 21 D: 死循环
- 【单选题】#include<stdio.h>intmain(){inta[3][3],*p,i;p=&a[0][0];for(i=0;i<9;i++){p[i]=i+1;}printf("%d ",a[1][2]);return0;} A. 6 B. 3 C. 9 D. 2
- 中国大学MOOC: 下面程序执行后的输出结果是( )。#include int main(){ int i=0,s=0; for (;;) { if(i==3||i==5) continue; if (i==6) break; i++; s+=i; }; printf(%d,s); return 0;}#include int main(){ int i=0,s=0; for (;;) { if(i==3||i==5) continue; if (i==6) break; i++; s+=i; }; printf(%d,s); return 0;}#include int main(){ int i=0,s=0; for (;;) { if(i==3||i==5) continue; if (i==6) break; i++; s+=i; }; printf(%d,s); return 0;}#include int main(){ int i=0,s=0; for (;;) { if(i==3||i==5) continue;
- 以下程序执行后的输出结果是()。#include<;stdio.h>;intmain(){inti=0,a=0;while(i<;20){for(;;){if((i%10)==0)break;elsei--;}i+=11;a+=i;}printf("%d",a);return0;} A: 21 B: 32 C: 33 D: 11