下面程序的运行结果为:int i=1,s=3;do{ s+=i++;if(s%7==0) continue;else ++i;}while(s<;15);printf(“%d”,i);
举一反三
- 以下程序的运行结果是8 。 #includemain(){ int i=1,s=3; do { s+=i++; if (s%7==0) continue; else ++i; } while (s<15); printf(“%d”,i);}
- 下列程序的输出结果是 。#includevoid main(){int i=1,s=3;do{s+=i++;if(s%7==0)continue;else++i;}while(s<;15);printf("i=%d\n",i);}
- 下面程序段的运行结果是_____。#includeiostreamusing namespace std;int main(){ int i=1,s=3; do {s+=i++; if (s%7==0) continue; else ++i;} while(s15); couti;}
- 中国大学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;
- 下面程序执行后的输出结果是()。#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: 死循环