给定代码片段如下所示,则编译运行后,输出结果是()。 for (int i=0;i<10;i++) { if (i == 10-i) break; if (i % 3 != 0) continue; System.out.print(i + " "); }A.0B.0 3C.0 3 6D.0 3 6 9

给定代码片段如下所示,则编译运行后,输出结果是()。 for (int i=0;i<10;i++) { if (i == 10-i) break; if (i % 3 != 0) continue; System.out.print(i + " "); }

A.0

B.0 3

C.0 3 6

D.0 3 6 9


参考答案和解析
B

相关考题:

有以下程序#include stdio.hmain(){ int a[ ]={2,3,5,4},i;for(i=0;i4;i++)switch(i%2){ case 0:switch(a[i]%2){case 0:a[i]++;break;case 1:a[i]--;}break;case 1:a[i ] =0;}for(i=0;i4;i++) printf("%d",a[i]); printf("\n");}程序运行后的输出结果是A)3 3 4 4B)2 0 5 0C)3 0 4 0D)0 3 0 4

有以下程序 main() { int i=0,s=0; for(;;) { if(i==3‖i==5) continue; if(i==6) break; i++; s+=i; }; printf("%d\n",s); } 程序运行后的输出结果是A.10B.13C.24D.程序进入死循环

( 7 )有如下程序段:fer ( int i=1; i=50;i++ ) {if ( i%3 != 0 )continue;elseif ( i%5!=0 )continue;touti" , " ;}执行这个程序段的输出是【 7 】 。

有如下程序段:for(inti=i;i<=50;i++){if(i%3 1=0)continue;else if(i%5 1=0)continue;cout<<i<<",";这个程序的输出结果是______。

以下程序的输出结果是( )。main{ int i=0,S=0;for(;;){if(i==3 ||i==5)continue;if(i==6)break;i++;s+=i:};printf(%d\n,s);}A.10B.13C.21D.程序陷入死循环

设有以下程序:main(){int i,sum=0;for(i=2;i<10;i++){ if((i%2)==0)continue;sum+=i;}printf("%d\n",sum);}程序执行后的输出结果是( )。

classTestApp{publicstaticvoidmain(String[]args){for(inti=0;i10;i++){if(i==3)break;System.out.print(i);}}}程序运行后的输出是哪项?() A.0123B.012C.0123456789D.012456789

程序:classTestApp{publicstaticvoidmain(String[]args){for(inti=0;i10;i++){if(i==3)break;System.out.print(i);}}}程序运行后的输出是哪项?() A.0123B.012C.0123456789D.012456789

以下程序执行后的输出结果是【】。includemain(){int i, m=0,n=0,k=0;for(i=9;i 以下程序执行后的输出结果是【 】。include<iostream.h>main(){int i, m=0,n=0,k=0;for(i=9;i<= 11 ;i++)switch(i/10){case 0: m++; n++; break;case 10: n++; break;default: k++; n++;}cout<<m<<n<<k;}

有如下程序段:for(int i=1;i=50;i++){if(i%3 1=0)continue;elseif(i%5 1=0)continue;couti”,”;}执行这个程序段的输出是【 】。

有以下程序main ( ) { int a[3] [3],*p, i; p=a[0] [0]; for (i=0;i<9; i++) p[i] =i; for(i=0;i<3;i++) printf ("%d" ,a[1] [i] );} 程序运行后的输出结果是A.12B.123C.234D.345

以下程序运行后的输出结果是()。includevoid reverse(int a[],int n){int i,t;for(i=0; 以下程序运行后的输出结果是( )。 #include<stdio.h> void reverse(int a[],int n) {int i,t; for(i=0;i<n/2;i++) {t==a[i];a[i]=a[n-1-i];a[n-1-i]=t;} } main() {int b[10]={10,9,8,7,6,5,4,3,2,1};int i,s=0; reverse(b,10); for(i=0;i<3;i++)s+=b[i]; printf("%d\n",s); }A.27B.6C.25D.30

有以下程序:include main ( ){int a[3] [3] , *p,i; p=a[0][0];for(i=0;i 有以下程序: #include <stdio.h> main ( ) { int a[3] [3] , *p,i; p=a[0][0]; for(i=0;i<9; i++)p[i]=i: for(i=0; i<3;i++)Printf("%d",a[1][i]); } 程序运行后的输出结果是( )。A.012B.123C.234D.345

下面代码的运行结果是 public class Test{ public static void main(String args[]){ for(int i=0; i<3;i++){ if(i<2) continue; System.out.println(i); } } }A.0B.1C.2D.3

有以下程序#includestdio.hmain( ){int a[]={2,3,5,4},i;for(i=0;i4;i++)switch(i%2){case 0:switch(a[i]%2){case 0:a[i]++;break;case 1:a[i]--;}break;case 1:a[i]=O;}for(i=O;i4;i++)prinff(“%d”,a[i]);prinff(“\n”);}程序运行后的输出结果是A.3 3 4 4B.2 0 5 0C.3 0 4 0D.0 3 0 4

以下程序运行后的输出结果是main{ int i,m=0,n=0,k=0; for(i=9;i=11;i++) switch(i/10) { case 0: m++;n++;break;  case 1: n++;break;  default:k++;n++; } printf("%d %d %d\n",m,n,k);}

若有以下程序main(){ int a[4][4]={{1,2,-3,-4},{0,-12,-13,14},{-21,23,0,-24},{-31,32,-33,0}}; int i,j,s=0; for(i=0;i4;i++) { for(j=0;j4;j++) { if(a[i][j]0) continue; if(a[i][j]==0) break; s +=a[i][j]; } } printf("%d\n",s);}程序执行后的输出结果是

有以下程序 #includestdi0.h main( ) {int a[]={2,3,5,4),i; for(i=0;i4;i++) switch(i%2) {case 0:switch(a[i]%2) {case 0:a[i]++;break; case l:a[i]--; }break; case1:a[i]=0; } for(i=0;i4;i++)printf("%d",a[i]);printf("\n"); } 程序运行后的输出结果是( )。A.3344B.2050C.3040D.0304

下面代码输出结果是( )。inti=0,s=0;do{if(i%2==0){i++;continue;}i++;s=s+i;}while(i 下面代码输出结果是( )。inti=0,s=0;do{if(i%2==0){i++;continue;}i++;s=s+i;}while(iSystem.out.println(s);A、16B、12C、28D、21

有以下程序 main() { int a[3][3],*p,i; p=a[0][0]; for(j=0;i<9;i++)p[i]=i; for(i=0;i<3;i++)printf("%d",a[1][i]); } 程序运行后的输出结果是A.12B.123C.234D.345

public class test3  {  public static void main(String args[])  {           for(int i = 0; i  3; i++)  {  for(int j = 3; j = 0; j--)  {                if(i == j)                    continue;       System.out.println("i="+ i + " j="+j);       }    }       }  }  上面的Java代码编译运行后,下列选项中,()会出现在输出结果中。 A、i=0 j=3B、i=0 j=0C、i=2 j=2D、i=0 j=2E、i=1 j=2

class TestApp{   public static void main (String[ ] args){   for(int i=0;i10;i++){   if(i==3)   break;   System.out.print (i);  }  }  }   程序运行后的输出是哪项?()  A、0123B、012C、0123456789D、012456789

程序:   class TestApp{   public static void main() String[] args){   for(int i=0;i10;i++){   if(i==3)   break; 当循环到3时,自动跳出  System.out.print(i);  }  }  }   程序运行后的输出是哪项?()A、0123B、012C、0123456789D、012456789

有如下程序段: int total = 0; for ( int i = 0; i  4; i++ ){ if ( i == 1) continue; if ( i == 2) break;total += i;} 则执行完该程序段后total的值为()A、0B、1C、3D、6

单选题程序:  class  TestApp{  public static void main(String[] args){   for(int i=0;i10;i++){  if(i==3)                    break;   System.out.print(i);  }      }  }  程序运行后的输出是哪项?()A 0123B 012C 0123456789D 012456789

单选题class TestApp{   public static void main (String[ ] args){   for(int i=0;i10;i++){   if(i==3)   break;   System.out.print (i);  }  }  }   程序运行后的输出是哪项?()A0123B012C0123456789D012456789

单选题有以下程序:#include main(){ int a[]={2,3,5,4},i; for(i=0;i4;i++) switch(i%2) {  case 0:      switch(a[i]%2)      {       case 0:a[i]++;break;       case 1:a[i]--;      }break;  case 1:a[i]=0; } for(i=0;i4;i++)printf(%d,a[i]); printf();}程序运行后的输出结果是(  )。A3344B2050C3040D0304

单选题有如下程序段: int total = 0; for ( int i = 0; i  4; i++ ){ if ( i == 1) continue; if ( i == 2) break;total += i;} 则执行完该程序段后total的值为()A0B1C3D6