以下程序段的输出结果是:inti=0,s=0;do{if(i%2){i++;continue;}i++;s+=i;}while(i<;7);printf("%d\n",s);
A: 16
B: 12
C: 21
D: 28
A: 16
B: 12
C: 21
D: 28
举一反三
- 有以下程序main(){inti=0,s=0;do{if(i%2){i++;continue;}i++;s+=i;}while(i<7);printf("%d",s);} A: 16 B: 12 C: 28 D: 21
- 下面代码输出结果是()。inti=0,s=0;do{if(i%2==0){i++;continue;}i++;s=s+i;}while(i<7);System.out.println(s); A: 16 B: 12 C: 18 D: 21
- 下面程序执行后的输出结果是()。#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: 死循环
- 下列程序的输出结果是 。#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);}
- 以下程序的运行结果是8 。 #includemain(){ int i=1,s=3; do { s+=i++; if (s%7==0) continue; else ++i; } while (s<15); printf(“%d”,i);}