下面程序运行后,输出的结果是Dim arr(3,3)For j=1 To 3For k=1 To 3Arr(j,k)=(j-1)*3+kNext kNext jFor j=2 To 3For j=2 To 3Print arr(k,j);Next kPrintNext jA.2 5 3 6B.5 8 6 9C.4 7 5 8D.5 9 6 8

下面程序运行后,输出的结果是

Dim arr(3,3)

For j=1 To 3

For k=1 To 3

Arr(j,k)=(j-1)*3+k

Next k

Next j

For j=2 To 3

For j=2 To 3

Print arr(k,j);

Next k

Print

Next j

A.2 5 3 6

B.5 8 6 9

C.4 7 5 8

D.5 9 6 8


相关考题:

下面程序运行后,输出的结果是Dim arr(3,3)For j=1 To 3For k=1 To 3Art(j,k)=(j-1)*3+kNext kNext jFor j=2 To 3For k=2 To 3Print arr(k,j);Next kPrintNext jA.25 36B.58 69C.47 58D.59 68

有以下程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer,j As IntegerReDim arr(3,2)For i=1 To 3For j=1 To 2arr (i,j)=i*2+jNext jNext iReDim Preserve arr(1,4)For j=3 To 4Arr(3,j)=j+9Next jPrint arr(3,2);arr(3,4)End Sub程序运行后,单击窗体,输出结果为( )。 A.8 13B.0 13C.7 12D.0 0

以下程序运行后,输出结果是( )。Forj=1 T0 3PrintTab(3*j);2*(j-1)*2*(j-1)NextjPrintA.B.C.D.

阅读下列程序段#include "stdio.h"typedef struct aa{ int a;struct aa *next; } M;void set(M *k,int i,int *b){ int j,d=0;for(j=1;j i;j++){ k[j-1].next=k[j];k[j-1].a=b[d++]; }k[j].a=b[d]; }main(){ M k[5],*p;int d[5]={23,34,45,56,67};set(k,5,d);p=k+1;printf("%d\n",table); }则下面的表达式在table处,能使程序执行后,打印输出数据45的是A.p-next-aB.++p-aC.(*p).a++D.p++-a

阅读下列程序。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运行程序时,输出的结果是【 】。

运行下列过程,当输入一组数据:10,20,50,80,40,30,90,100,60.70,输出的结果应该是sub pl( )Dim i, j, arr(11)As Integerk=1While k=10arr(k)=Val(InputBox("请输入第" k "个数:", "输入窗口" ))k=k+1WendFor i=1 T0 9j=i+1If arr(i) arr(j) Thentemp=arr (i)arr(i)=arr (j)arr(j)=tempEnd IfDebug Print arr(i)Next iEnd SubA)升序数列B)降序数列C)无序数列D)原输入数列

下列程序的功能是:输入10个整数,逆序后输出。请在程序空白处填入适当语句使程序完成指定的功能。Private Sub Command2_Click()Dim i, j, k,temp, arr(11) As lntegerDim result As StringFor k=1 To 10arr(k) =Val (InputBox( "请输入第" k "个数:","数据输入窗口"))Next ki=1j = 10Dotemp=arr(i)arr(i)=arr(j)arr(j)=tempi=i+1j=【12】Loop While【13】result =""For k=1 To 10result=result arr(k) Chr(13)NeXt kMsgBox resultEnd Sub

下列程序的功能是:输入l0个整数。‘Private sub Command2_Click Dim i,j,k,temp,arr(11)As Integer Dimresult As String For k=1T0 10 arr(k)=Val(InputBox( “请输入第”k”个数:”,”数据输入窗口”)) Next k i=1 J=10 Do Temp=arr(i) arr(i)=arr(j) arr(j)=tempi=i+1 j=__________LoopWhileresule=””For k=1 To 10 result=resultarr(k)Chr(13)Nextk MsgBoxresult End Sub 横线处应填写的内容是( )。A.J-i ijB.j+1 ijC.j+1 ijD.J-1 ij

运行下列过程,当输入一组数据:l0,20,50,80,40,30,90,100,60,70,输出的结果应该是( )。Sub plDim i,j,arr(11)AsIntegerx=1Whilek=10arr(k)=VaI(InputBox(”请输入第”k”个数:”,”输入窗口”))k=k+1WendFor i=1T09J=i+1Ifarr(i)arr(j)Thentemp=arr(i)arr(i)=art(j)arr(j)=tempEndIfDebu9.Printarr(i)NextiEnd SubA.无序数列B.升序数列C.降序数列D.原输入数列