阅读下列程序。Option Base 1Private Sub Form. _Click()Dim x(3,3)For j=1 to 3For k=l to 3If j=k then x(j,k)=1If j<>k then x(j,k)=kNext kNext iCall fun(x())End SubPrivate Sub fun(x())For j=1 to 3For k=1 to 3Print x(j,k);Next kNext jEnd Sub运行程序时,输出结果为【 】。
阅读下列程序。
Option Base 1
Private Sub Form. _Click()
Dim x(3,3)
For j=1 to 3
For k=l to 3
If j=k then x(j,k)=1
If j<>k then x(j,k)=k
Next k
Next i
Call fun(x())
End Sub
Private Sub fun(x())
For j=1 to 3
For k=1 to 3
Print x(j,k);
Next k
Next j
End Sub
运行程序时,输出结果为【 】。
相关考题:
有以下程序 main(){intx[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i=i;j--) if(x[ 有以下程序 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
有以下程序: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
阅读下列程序。Option Base 1Private Sub Form. Click()Dim x(3,3)For j=l to 3For k=l to 3If j=k then x(j,k)=lIf j<>k then x(j,k)=kNext kNext jCall fun(x())End SubPrivate Sub fun(x() )For j=1 to 3For k=1 to 3Print x(j,k);Next kNext jEnd Sub运行程序时,输出结果为【 】
下列程序的运行结果为【 】。A="1"B="2"A=Val (@A@+Val (@B@B=Val ("12")If A<>B Then Prink A-B Else Print B-A(11)阅读下列程序:Option Base 1Private Sub Form. Click()Dim x(3,3)For j=1 to 3For k=1 to 3If j=k then x(j,k)=1If j<> k then x(j,k)=3Next kNext jCall fun(x())End SubPrivate Sub fun(a())For j=l to 3For k=1 to 3Print a (j.k);Next kNext jEnd Sub运行程序时,输出的结果是【 】
阅读下列函数说明和C代码,将应填入(n)处的字句写在对应栏内。【说明2.1】以下C语言函数用二分插入法实现对整型数组a中n个数的排序功能。【函数2.1】void fun1 (int a[]){ int i,j,k,r,x,m;for(i=2;i<=n;i++){ (1);k=1;r=i-1;while(k<=r){ m=(k+r)/2;if(x<a[m])r=m-1;else (2);}for(j=i-1;j>=k;j--)a[j+l]=a[j];(3);}}【说明2.2】以下程序可以把从键盘上输入的十进制数(long型)以二~十六进制形式输出。【程序2.2】include<stdio.h>main(){ charb[16]={'0','l','2','3 ,4,'5','6','7','8','9','A','B','C','D','E','F'};int c[64],d,i=0,base;long n;printf("enter a number:\n");scanf("%1d",n);printf("enter new basc:\n");scanf("%d", base);do{ c[i]=(4);i++; n=n/base;} while(n!=0);printf("transmite new base:\n");for(--i;i>=0;--i){ d=c[i];printf("%c",(5));}}
有以下程序 main() { int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i=i; 有以下程序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+1]>x[j]){ k=x[j];x[j]=x[j+1];x[j+1]=k;}for (i=0;i<3;i++)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
阅读下列程序。Option Base 1Private Sub Form CliCk()Dim x(3,3)For j=1 to 3For k=1 to 3If j=k then x(j,k)=1If j<> k then x(j,k)=3Next kNext jCall fun(x())End SubPrivate Sub fun(a())For j=1 to 3For k=1 to 3Print a (j,k);Next kNext jEnd Sub运行程序时,输出的结果是【 】。
阅读下列FORTRAN程序:DIMENSION M(6)READ(*,*)MDO 10 J=l,6 DO 10 K=J,6 IF(M(K)LTM(J))THEN N=M(K)M(K)=M(J)M(J)=N END IF 10 CONTINUEWRITE(*,100)(M(I),I=1,6)100 FORMAT(2X,614)END键盘输入10,7,9,2,1,3;程序运行后的输出结果是:A. 1 2 3 7 9 10B. 10 9 7 3 2 1C. 7 9 2 1 3 10D. 3 1 2 9 7 10
计算下列程序段中x++的语句频度: for(i=1; i<=n; i++) for(j=1; j<=i; j++) for(k=1; k<=j; k++) x++;