单选题写出程序的运行结果。 #include main( ) { int j; for(j=0;j10;j++) {if (j%2==0) continue; printf("%d",j); } } 该程序的执行结果是()。A0 4 2 6 8B1 3 5 7C1 3 5 7 9D2 4 6 8

单选题
写出程序的运行结果。 #include main( ) { int j; for(j=0;j<10;j++) {if (j%2==0) continue; printf("%d",j); } } 该程序的执行结果是()。
A

0 4 2 6 8

B

1 3 5 7

C

1 3 5 7 9

D

2 4 6 8


参考解析

解析: 暂无解析

相关考题:

有以下程序main( ){ int a[4][4]={{1,4,3,2,},{8,6,5,7,},{3,7,2,5,},{4,8,6,1,}},i,j,k,t;for(i=0;i4;i++)for(j=0;j3;j++)for(k=j+1;k4;k++)if(a[j][i]a[k][i]){t=a[j][i];a[j][i]=a[k][i];a[k][i]=t;}/* 按列排序 */for(i=0;i4;i++)printf("%d,",a[i][ i ]);}程序运行后的输出结果是A)1,6,5,7,B)8,7,3,1,C)4,7,5,2,D)1,6,2,1,

有以下程序#include stdio.hvoid fun(int *a,int n)/*fun 函数的功能是将 a 所指数组元素从大到小排序 */{ int t,i,j;for(i=0;in-1;i++)for(j=i+1;jn;j++)if (a[i]a[j]) {t=a[i];a[i]=a[j];a[j]=t;}}main(){ int c[10]={1,2,3,4,5,6,7,8,9,0},i;fun(c+4,6);for (i=0;i10;i++) printf("%d,",c[i]);printf("\n");}程序运行的结果是A ) 1,2,3,4,5,6,7,8,9,0,B)0,9,8,7,6,5,1,2,3,4,C) 0,9,8,7,6,5,4,3,2,1,D)1,2,3,4,9,8,7,6,5,0,

有以下程序main(){int a[4][4]={{1,4,3,2,},{8,6,5,7,},{3,7,2,5,},{4,8,6,1,}},i,j,k,t;for(i=0;i4;i++)for(j=0;j3;j++)for(k=j+1;k4;k++)if(a[j][i]a[k][i]){t=a[j][i];a[j][i]=a[k][i];a[k][i]=t;}/*按列排序*/for(i=0;i4;i++)printf(“%d,”,a[i][j]);}程序运行后的输出结果是( )。A.1,6,5,7,B.8,7,3,1,C.4,7,5,2,D.1,6,2,1,

以下程序运行后的输出结构是。main(){ int i,j,a[][3]={1,2,3,4,5,6,7,8,9}; for(i=0;i3;i++) for(j=i;j3;j++)a[j][i]=0; for(i=0;i3;i++) { for(j=0;j3;j++) printf("%d ",a[i][j]); printf("\n"); }}

有以下程序 main() { int a[4][4]={{1,4,3,2},{8,6,5,7},{3,7,2,5},{4,8,6,1}},i,j,k,t; for(i=0;<4:i++) for(j=0;j<3;j++) for(k=j+1;k<4;k++) if(a[j][i]>a[k][i]{t=a[j][i];a[j][i]=a[k][i]=a[k][i]=t;}/*按列排序*/ for(i=0;i<4;i++)printf("%d,",a[i][i]); } 程序运行后的输出结果是A.1,6,5,7,B.8,7,3,1,C.4,7,5,2,D.1,6,2,1,

有以下程序:main(){int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i=i;j--)if ( 有以下程序: main() { int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i<3;i++) for (j=2;j>=i;j--) if (x[j+1)>x[j]){k=x[j];x[j];x[j+1);x[j+1]=k;} for (i=0;i<3;i++) for (j=4;j<7-i;j++) if (x[j]>x[j+1]){k=x [j];x[j]=x[j+1];x[j+1)=k;} for(i=0;i<8;i++)printf("%d",x[i]); printf("\n"); } 程序运行后的输出结果是 ______。A.75310246B.1234567C.76310462D.13570246

有以下程序#include stdio.hvoid fun(int *a,int n)/*fun函数的功能是将a所指数组元素从大到小排序*/{ int t,i,j;for(i=0;in-1;j++)for(j=i+1;jn;j++)if(a[i]a[j]) { t=a[i];a[i]=a[j];a[j]=t;}}main(){ int c[10]={1,2,3,4,5,6,7,8,9,0},i;fun(c+4,6);for(i=0;i10;i++) printf("%d,",c[i]);printf("\n");}程序的运行结果是A.1,2,3,4,5,6,7,8,9,0,B.0,9,8,7,6,5,1,2,3,4,C.0,9,8,7,6,5,4,3,2,1,D.1,2,3,4,9,8,7,6,5,0,

以下程序是求矩阵a、b的和,结果存入矩阵c中,请填空。 include main() {int a[4][4]={1,2, 以下程序是求矩阵a、b的和,结果存入矩阵c中,请填空。 include<stdio.h> main() {int a[4][4]={1,2,6,7},{0,4,2,-8},{1,4,5,2},{2,4,6,8}}; int b[4][4]={{-4,0,7,9},{2,-7,7,4),{6,9,0,1),{8,8,6,5)}; int i,j,c[4][4]; for(i=0;i<4;i++) for(j=0;j<4;j++) c[i][j]=( ); for(i=0;i<4;i++) for(j=0;j<4;j++) printf("%d",c[i][j]); }

有以下程序: include main ( ){int x[ ] = {1,3,5,7,2,4,6,0} ,i,j,k;for(i =0;i 有以下程序: #include <stdio. h> main ( ) { int x[ ] = {1,3,5,7,2,4,6,0} ,i,j,k; for(i =0;i<3;i ++ ) for (j =2;j> = i;j — ) if( x[j + 1 ] > x[j] ) { k = x[j] ;x[j] = x[j + 1 ] ;x[j + 1 ] = k; } for (i =0;i<3;i++) for(j =4;j <7-i;j ++) if(x[j] >x[j+1]){ k=x[j];x[j] =x[j+1];x[j+1] =k;} for (i=0;i<8;i ++) printf("%d" ,x[i]); prinff("\n" );}程序运行后的输出结果是( )。A.75310246B.1234567C.76310462D.13570246

有以下程序,程序运行后的输出结果是______。 int f(int b[][4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2)i=3-j; s+==b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); }A.22B.11C.18D.16

include void sort(inta[],int n) {int i,j,t;for(i=0;i include<stdio.h>void sort(inta[],int n){int i,j,t;for(i=0;i<n-1;i++)for(j=i+1;<n;j++)if(a[i]<a[j]){t=a[i];a[i]=a[j];a[j]=t;}}main(){int a[10]={1,2,3,4,5,6,7,8,9,10},i;sort(a[1],7);for(i=0;i<10;i++)printf("%d,",a[i]);}程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.1,8,7,6,5,4,3,2,9,10,D.1,2,10,9,8,7,6,5,4,3,

有以下程序:include int f(int b[] [4]){int i,j,s=0; for(j=0;j2) 有以下程序: #include <stdio.h> int f(int b[] [4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); } 执行后的输出结果是( )。A.12B.11C.18D.16

有以下程序 #includestdio.h void fun(int*a,int n)/*fun函数的功能是将a所指数组元素从大到小排序*/ {int t,i,j; for(i=0;in-1;j++) for(j=i+l;jn;j++) if(a[i]a[j]){t=a[i];a[i]=a[j];a[j]=t;} } main {int c[10]={1,2,3,4,5,6,7,8,9,0),i; fun(c+4,6); for(i=0;i10;i++)printf("%d,",c[i]); printf("\n"); } 程序运行的结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.0,9,8,7,6,5,1,2,3,4,C.0,9,8,7,6,5,4,3,2,1,D.1,2,3,4,9,8,7,6,5,0,

阅读以下程序: include void main() { static int a[][3]={9,7,5,3,1,2,4,6,8}; int 阅读以下程序:include<iostream.h>void main(){static int a[][3]={9,7,5,3,1,2,4,6,8};int i,j,s1=0,s2=0;for(i=0;i<3;i++)for(j=0;j<3;j++){if(i==j)s1=sl+a[i][j];if(i+j==2)s2=s2+a[i][j];}cout<<s1<<","<<s2<<endl;}则该程序的输出结果为【 】。

有下列程序:void sort(int a[],int n){ int i,j,t;for(i=0;in-l;i++)for(j=i+1;jn;j++)if(a[i]a[j]){t=a[i];a[i]一a[j];a[j]=t;}}main{ int aa[10]:{1,2,3,4,5,6,7,8,9,10),i;sort(aa+2,5);for(i=0;i10;i++)printf(%d,,aa[i]);printf(\n);}程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,l0,B.1,2,7,6,3,4,5,8,9,10,C.1,2,7,6,5,4,3,8,9,10,D.1,2,9,8,7,6,5,4,3,10,

有以下程序: void sort(int a[], int n) {int i,j,t; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(a[i]<a[j]) { t=a[i]; a[i]=a[j]; a[j]=t; } } main() { int aa[10]={1,2,3,4,5,6,7,8,9,10},i; sort(aa+2,5); for(i=0;i<10;i++)printf("%d,",aa[i]); printf("\n"); } 程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1,2,7,6,3,4,5,8,9,10,C.1,2,7,6,5,4,3,8,9,10,D.1,2,9,8,7,6,5,4,3,10,

有以下程序 include void fun(int *a,int n)/*fun函数的功能是将a所指数组元素从大到 有以下程序#include <stdio.h>void fun(int *a,int n)/*fun函数的功能是将a所指数组元素从大到小排序*/{ int t,i,j;for(i=0;i<n-1;j++)for(j=i+1;j<n;j++)if(a[i]<a[j]) { t=a[i];a[i]=a[j];a[j]=t;}}main( ){ int c[10]={1,2,3,4,5,6,7,8,9,0},i;fun(c+4,6);for(i=0;i<10;i++) printf("%d,",c[i]);printf("\n");}程序的运行结果是A.1,2,3,4,5,6,7,8,9,0,B.0,9,8,7,6,5,1,2,3,4,C.0,9,8,7,6,5,4,3,2,1,D.1,2,3,4,9,8,7,6,5,0,

有以下程序:int f(int b[][4]){int i, j, s=0;for(j=0; j2)i=3-j;S+=b[i][j]; 有以下程序: int f(int b[][4]) { int i, j, s=0; for(j=0; j<4; j++) { i=j; if(i>2)i=3-j; S+=b[i][j]; } return s; } main() { int a[4][4]={{1, 2, 3, 4}, {0, 2, 4, 6}, {3, 6, 9, 12}, {3, 2, 1, 0}}; printf("%d\n", f(a)); } 执行后的输出结果是______。A.12B.11C.18D.16

下面程序的运行结果是()。include void main(){static int a[][4]={ 1,2,3,4,5,6,7, 下面程序的运行结果是( )。#include <iostream.h>void main(){static int a[][4]={ 1,2,3,4,5,6,7,8,9,10,11,12};int i, j, sum=0;for(i=0;i<3;i++)for(j=0;j<4;j++)if(j>i)sum+=a[i][j];cout<<sum<<end1;}A.24B.30C.36D.40

有以下程序: void sott(int a[], int n) { int i, j, t; for(i=0; i<n-1; i++) for(j=i+1; j<n; j++) if(a[i]<a[j]){t=a[i];a[i]=a[j];a[j]=t;) } main() {int aa[10]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, I; sort(aa+2, 5); for (i=0; i<10; i++)printf("% d", aa[i]); printf("\n"); } 程序运行后的输出结果是______。A.1, 2, 3, 4, 5, 6, 7, 8, 9, 10,B.1, 2, 7, 6, 3, 4, 5, 8, 9, 10,C.1, 2, 7, 6, 5, 4, 3, 8, 9, 10,D.1, 2, 9, 8, 7, 6, 5, 4, 3, 10,

有以下程序:main(){int x[]={1,3,5,7,2,4,6,0},i,j,k;for(i=0;i=i;j--)if(x[j+ 有以下程序: main() { int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i<3;i++) for(j=2;j>=i;j--) if(x[j+1]>x[j]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k; } for(i=0;i<3;i++) for(j=4;j<7-i;j++) if(x[j]>x[j+1]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k; } for(i=0;i<8;i++) printf("%d",x[i]); printf("\n"); } 程序运行后的输出结果是( )。A.75310246B.1234567C.76310462D.13570246

( 9 )有以下程序#include stdio.hmain (){ int i,j,a[][3]={1,2,3,4,5,6,7,8,9};for ( i=0;i3;i++ )for ( j=i;j3;j++ ) printf ( " %d%,a[i][j] ) ;printf ( " \n " ) ;}程序运行后的输出结果是 【 9 】 。

有以下程序#includestdio.hvoid fun(int *a,int n)/*fun函数功能是将a所指的数组元素从大到小排序*/{int t,i,j;for(i=0;in-1;i++)for(j=i+1;jn;j++)if(aa[j]) { t=a;a=a[j];a[j]=t; }}main(){int c[10]={1,2,3,4,5,6,7,8,9,0},i;fun(c+4,6);for(i=0;i10;i++) printf(“%d,”,C.;printf(“\n”);}程序的运行结果是( )。A.1,2,3,4,5,6,7,8,9,0B.0,9,8,7,6,5,1,2,3,4C.0,9,8,7,6,5,4,3,2,1D.1,2,3,4,9,8,7,6,5,0

写出程序的运行结果。 #include main( ) { int j; for(j=0;j10;j++) {if (j%2==0) continue; printf("%d",j); } } 该程序的执行结果是()。A、0 4 2 6 8B、1 3 5 7C、1 3 5 7 9D、2 4 6 8

单选题有以下程序:#include #include main(){ int i,j,x = 0; for(i = 0;i 2;i++) {  x++;  for(j = 0;j = 3;j++)  {   if(j%2==0)continue;   x++;  }  x++; } printf(x = %d,x);}程序的运行结果是(  )。Ax=4Bx=6Cx=8Dx=12

单选题有以下程序 #include voidfun(int*a,intn) {  intt,i,j;  for(i=0;i   for(j=i+1;j    if(a[i]    {     t=a[i];     a[i]=a[j];     a[j]=t;    } } main() {  intc[10]={1,2,3,4,5,6,7,8,9,0},i;  fun(c+4,6);  for(i=0;i  printf(""); } 程序的运行结果是(  )。A1,2,3,4,9,8,7,6,5,0,B0,9,8,7,6,5,1,2,3,4,C0,9,8,7,6,5,4,3,2,1,D1,2,3,4,5,6,7,8,9,0,

单选题写出程序的运行结果。 #include main( ) { int j; for(j=0;j10;j++) {if (j%2==0) continue; printf("%d",j); } } 该程序的执行结果是()。A0 4 2 6 8B1 3 5 7C1 3 5 7 9D2 4 6 8

单选题有以下程序:#include #include main(){ int i,j,x = 0; for(i = 0;i 2;i++) {  x++;  for(j = 0;j = 3;j++)  {   if(j%2)continue;   x++;  }  x++; } printf(x = %d,x);}程序的运行结果是(  )。Ax=8Bx=4Cx=6Dx=12