有程序:INTEGERM(3,3)DATAM/1,2,3,4,5,6,7,8,9/DO10I=1.3DO10J=1,3K=M(I,J)M(I,J)=M(J,I)M(J,I)=K10CONTINUEWRITE(*,100)((M(I,J),J=1,3),I=1,3)100FORMAT(1x,3I2)END此程序执行后的结果为:()A、1;4;7;2;5;8;3;6;9B、1;2;3;4;5;6;7;8;9C、9;6;3;8;5;2;7;4;1D、7;8;9;4;5;6;1;2;3

有程序:INTEGERM(3,3)DATAM/1,2,3,4,5,6,7,8,9/DO10I=1.3DO10J=1,3K=M(I,J)M(I,J)=M(J,I)M(J,I)=K10CONTINUEWRITE(*,100)((M(I,J),J=1,3),I=1,3)100FORMAT(1x,3I2)END此程序执行后的结果为:()

  • A、1;4;7;2;5;8;3;6;9
  • B、1;2;3;4;5;6;7;8;9
  • C、9;6;3;8;5;2;7;4;1
  • D、7;8;9;4;5;6;1;2;3

相关考题:

有以下程序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,

有以下程序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 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,

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

有以下程序 main( ) { int m[ ][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i3;i++) { printf("%d ",m[k][i]); } } 执行后输出结果是A.4 5 6B.2 5 8C.3 6 9D.7 8 9

阅读以下说明和C代码,将应填入(n)处的字句写在对应栏内。【说明】将一正整数序列{K1,K2,…,K9}重新排列成一个新的序列,新序列中,比K1小的数都在K1的前面(左面),比K1大的数都在K1的后面(右面),最后调用writeDat()函数的新序列输出到文件out.dat中。在程序中已给出了10个序列,每个序列有9个正整数,并存入数组a[10][9]中,分别求出这10个新序列。例:序列{6,8,9,1,2,5,4,7,3}经重排后成为{3,4,5,2,1,6,8,9,7}【函数】include < stdio. h >include < conio. h >void jsValue( int a [10] [9] ){ int i,j,k,n,temp;int b[9];for(i=0;i<10;i++){ temp=a[i] [0];k=8;n=0;for(j=8;j=0;j--){ if(temp < a[i] [j]) (1)=a[i][j];if(temp >a[i] [j]) (2)=a[i][j];if(temp =a[i] [j]) (3)= temp;}for(j=0;j<9;j++) a[i][j] =b[j];}}void main( )int a[10] [9] = {{6,8,9,1,2,5,4,7,3},{3,5,8,9,1,2,6,4,7},{8,2,1,9,3,5,4,6,7}, {3,5,1,2,9,8,6,7,4},{4,7,8,9,1,2,5,3,6}, {4,7,3,5,1,2,6,8,9},{9,1,3,5,8,6,2,4,7}, {2,6,1,9,8,3,5,7,4},{5,3,7,9,1,8,2,6,4}, {7,1,3,2,5,8,9,4,6}};int i,j;(4);for(i=0;i<10;i++) {for(j=0;j<9;j++) {printf("%d",a[i] [j] );if((5))printf(",");}printf(" \n" );}getch( );}

有以下程序: include void sort(int a[] ,int n){int i,j,t; for(i=0;i 有以下程序: #include <stdio, h>void sort(int a[] ,int n){ int i,j,t; for(i=0;i<n;i ++ ) for(j =i+ 1;j<n;j ++ ) if(a[i]<a[j]){ t=a[1] ;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++) prinff("%d," ,aa[i]); prinff("\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,

有以下程序: void sort(int a[],int n) { int i,j,t; for(i=0;i<n;i++) for(j=i+1;<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 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,

有以下程序 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;i<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,

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

有以下程序 main() { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=1 for(i=0;i<3;i++) { printf("%d",m[k][i]); } }执行后输出结果是______。A.4 5 6B.2 5 8C.3 6 9D.7 8 9

有下列程序: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,

有以下程序 vold soru(int a[], int n) { int i,i,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[i]; a[j]=t; } } main() { int aa[10]={1,2,3,4,5,6,7,8,9,10),i; sore(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,

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

有以下程序 main() { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i<3;i++) { printf("%d ",m[k][i]); } } 执行后输出结果是A.456B.2 5 8C.3 6 9D.7 8 9

请阅读程序. 0ption Base 1 Private Sub Fo,m Click( ) Dim Arr(4,4)As Integer For i=1 To 4 For j=1 To 4 Arr(i,j)=(i=1)*2+j Next j Next i For i=3 To 4 For j=3 To 4 Print Arr(j,i); Next j Print Next i End Sub 程序运行后,单。旨窗体,则输出结果是( )。A.5 7 6 8B.6 8 7 9C.7 9 8 10D.8 10 8 11

有以下程序: 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,

有以下程序: 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;i<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;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,

有以下程序:includevoid sort(int a[],int n){int i,j,t; for(i=0;i 有以下程序: #include <stdio.h> void sort(int a[],int n) { int i,j,t; for(i=0;i<n-1;i+=2) for(j=i+2;j<n;j+=2) 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,10); for(i=0;i<10;i++) printf("%d.",aa[i]); printf("\n"); } 其输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.9,2,7,4,5,6,3,8,1,10,D.1,10,3,8,5,6,7,4,9,2,

有以下程序: 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,

单选题有以下程序 #include main() {  inta[4][4]={{1,4,3,2},{8,6,5,7},{3,7,2,5},{4,8,6,1}};  inti,j,k,t;  for(i=0;i   for(j=0;j    for(k=j+1;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   printf("%d,",a[i][i]); } 程序运行后的输出结果是(  )。A8,7,3,1,B1,6,5,7,C4,7,5,2,D1,6,2,1,

单选题若有以下程序#include void fun(int a[],int n){ int t,i,j; for(i=1;i  for(j=i+2;j   if(a[i]a[j])   {    t=a[i];    a[i]=a[j];    a[j]=t;   }}main(){ int c[10]={10,9,8,7,6,5,4,3,2,1},i; fun(c,10); for(i=0;i printf("");}则程序的输出结果是(  )。A2,9,4,7,6,5,8,3,10,1,B10,9,8,7,6,5,4,3,2,1,C10,1,8,3,6,5,4,7,2,9,D1,10,3,8,5,6,7,4,9,2,

单选题阅读下列程序 INTEGER M(3,3)   DATA  M/1,2,3,4,5,6,7,8,9/    WRITE(*,10)(M(3,J),J=1,3)     10 FORMAT(1X,3I2)     END  程序运行结果是()A2  5  8B3  6  9C4  5  6D7  8  9

单选题有以下程序 #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,

单选题有程序:INTEGERM(3,3)DATAM/1,2,3,4,5,6,7,8,9/DO10I=1.3DO10J=1,3K=M(I,J)M(I,J)=M(J,I)M(J,I)=K10CONTINUEWRITE(*,100)((M(I,J),J=1,3),I=1,3)100FORMAT(1x,3I2)END此程序执行后的结果为:()A1;4;7;2;5;8;3;6;9B1;2;3;4;5;6;7;8;9C9;6;3;8;5;2;7;4;1D7;8;9;4;5;6;1;2;3

单选题阅读下列程序  DIMENSION M(3,3)  DATA M/1,2,3,4,5,6,7,8,9/  WRITE(*,100)(M(3,J),J=1,3)  100 FORMAT(1X,3I2)  END  程序运行结果是()A 2  5  8B 3  6  9C 4  5  6D 7  8  9