下列程序运行后的输出结果是______。Private Sub f(k,s)s=1For j=1 To ks=s*jNextEnd SubPrivate Sub Command1_Click()Sum=0For i=1 To 3Call f(i,s)Sum=Sum+sNextPrint SumEnd Sub

下列程序运行后的输出结果是______。

Private Sub f(k,s)

s=1

For j=1 To k

s=s*j

Next

End Sub

Private Sub Command1_Click()

Sum=0

For i=1 To 3

Call f(i,s)

Sum=Sum+s

Next

Print Sum

End Sub


相关考题:

( 30 )下面程序的输出结果是Private Sub Command1_Click()ch$= ” ABCDEF ”proc chPrint chEnd SubPrivate Sub proc(ch As String)S= ””For k=Len(ch) To 1 Step-1s=sMid(ch,k,1)Next kch=sEnd SubA ) ABCDEFB ) FEDCBAC ) AD ) F

(30)在窗体上画一个名为 Command1 的命令按钮,然后编写如下代码:Option Base 1Private Sub Command1_Click( )Dim aa=Array(1, 2, 3, 4)j=1For i=4 To 1 Step -1s=s+a(i)*jj=j*10Next iPrint sEnd Sub运行上面的程序,其输出结果是( )。A)1234B)12C)34D)4321

( 23 )在窗体上画一个命令按钮,其名称为 command1, 然后编写如下代码:Option Base 1Private Sub Command1_Click()Dim aa = Array(1, 2, 3, 4)j = 1For i = 4 To 1 Step -1s = s + a(i) * jj = j * 10Next iPrint sEnd Sub程序运行后,单击命令按钮后,其输出结果是A ) 4321B ) 1234C ) 34D ) 12

执行下列程序段后输出的结果是( )。s = 1For i = 1 To 3For j = 0 To i-1s = s + s * jNext j? s;Next IA、 1 2B、 2 1C、 2 2 12D、 1 2 12

运行下列程序,单击窗体后输出的结果是( )。Private Sub Form_Click()Dim aDim s As Integer, i As Integera = Array(1, 2, 3, 4, 5, 6)s = 1For i = 5 To 1 Step -2s = s * a(i)Next iPrint sEnd SubA、 15B、 48C、 120D、 720

设有如下程序:Private Sub Form_C1ick()Dim s As Long,f As LongDim n As Integer,i As Integerf=1n=4For i=1 To nf=f*is=s+fNext iPrint sEnd Sub程序运行后,单击窗体,输出结果是A.32B.33C.34 0)35

窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是 Private Sub Commandl_Click() Dim a a=Array(1,2,3,4,5) Fork=1 To 4 s=s+a(k) Next k Print s End Sub A.10 B.14 C.15 D.120

(24)在窗体上画一个名为Command1德命令按钮,然后编写下列程序: Option Base 1 Private Sub Command1_Click() Dim Arr Arr=Array(1,2,3,4,5) j=1 For i=5 To 1 Step -1 S=S+Arr(i)*j j=j*10 Next Print S End Sub 程序运行后,单击命令按钮,输出结果是 A.54321 B.123 C.12345 D.345

下面运行程序后,单击命令按钮,输出的结果是 【 】 。Private Sub Command1_Click()Dim a%(1 To 5),i%, s#For i=1 To 5a(i)=iNexts=Fun(a)Print "s="; s;End SubFunction Fun(a() As Integer)Dim t#, i%t=1For i=LBound(a) To UBound(a)t=t  a(i)NextFun=tEnd Function

以下程序的输出结果是【 】。include defineN 5 int fun(int *s,int a,int n) {int j; *s= 以下程序的输出结果是【 】。include <stdio.h>define N 5int fun(int *s,int a,int n){ int j;*s=a j=n;while(a!=s[j]) j-;return j;main(){ int s[N+1]; int k:for(k=1 ;k<=N;k++) s[k]=k+1:print f("%d\n",fun(s,4,N));}

设有如下程序: Private Sub Form. Click( ) Dim s As Long,f As Long Dim n As Integer,i As Integer f=1 n=4 For i=1 To n f=f*i s=s+f Next i Print s End Sub 程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35

窗体上有一个命令按钮,命令按钮的单击事件过程如下: Private Sub Command1_Click() Dim a a=Array(1,2,3,4,5) For k=1 To 4 s=s+a(k) Next Print S End Sub 运行程序后,单击命令按钮,输出结果是A.10B.14C.15D.120

有如下程序 Private Sub Command1_Chck( ) s=0 DO s=(s+1) *(s+2) N=N+1 Loop Until s>=10 Prim N;s End Sub 运行后的输出结果是A.0 1B.30 30C.4 30D.2 12

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

下面运行程序后,单击命令按钮,输出出的结果是【 】。Private Sub Command1_Click( )Dim a% (1 To 5) ,i%, sFor i = 1 To 5a(i) =iNexts = Fun(a)Print"s="; s;End SubFunction Fun(a() As Integer)Dim t, i%t=1For i = LBound(A0To UBound(a)t=t * a(i)NextFun =tEnd Function

下面程序的输出结果是。 Private Sub Commandl_Click ch$=“ABCDEF” proc ch:Print ch End Sub Private Sub proc(ch As Stnng) s=“” For k=Len(ch) TO 1 Step -1 s=sMid(ch,k,1) Next k ch=s End Sub A.ABCDEF B.FEDCBA C.A D.F

在窗体上画一个名为Command1的命令按钮,然后编写下列程序:Option Base 1Private Sub Command1_Click()Dim ArrArr=Array(1,2,3,4,5)j=1For i=5 To 1 Step-1S=S+Arr(i)*jj=j*10NextPrint SEnd Sub程序运行后,单击命令按钮,输出结果是( )。A.54321B.123C.12345D.345

下列程序运行后的输出结果是______。Private Sub f(k,s) s = 1 for j = 1 To k s=s*j Next jEnd SubPrivate Sub Command1_ Click () Sum = 0 for i = 1 To 3 Call f(i, s) Sum = Sum + s Next i Print Sum End SubA.0B.3C.6D.9

在窗体上面1个名称为Command1的命令按钮,然后编写下列事件过程 Option Base 1 Private Sub,Command1 Click( ) Dim a(5,5)ks Integer For i=1 To j For j=1 To 5 a(i,j)=(i+j)*5\10 Next j Next i S=0 For i=1 To j s=s+a(i,i) Next i Print s End Sub 程序运行后,单击命令按钮,输出结果是( )。A.15B.13C.11D.9

下面程序运行后的结果是( )。 Private Sub Form_Click() Dim s As Integer,k As Integer,i As Integer,n As Integer s=1 fori=1 to 3 forj=i to 3 for k=j to istep-1 s=s*k nextk,J,i print s End SubA.6B.72C.144D.432

设有如下程序:Private Sub Form. Click( )Dim s As Long,f As LongDim n As Integer,i As Integerf=1n=4For i=1 To nf=f*is=s+fNext iPrint sEnd Sub程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35

在窗体上画一个命令按钮,其名称为Command1,然后编写下列代码: Option Base l Private Sub Command1 Click( ) Dim a a=Array(1,2,3,4) j=1 For i=4 To 1 Step-1 s=s+a(i)*j j=j*10 Next i Print S End Sub 程序运行后,单击命令按钮,其输出结果是( )。A.4321B.1234C.34D.12

运行下列程序:Private Sub form_Click( )For i = 1 To 2x = 1For j = 1 To 3x = 5For k = 1 To 4x = x + 2Next kNext jNext iPrint xEnd Sub单击窗体后,则输出结果是( )。A.5B.13C.25D.48

运行下列程序:Private Sub form_Click( )x = 8: y = 2Call fun1((x), y)Print x, yEnd SubPrivate Sub fun1(x, y)s = xx = s / yy = s Mod yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.4 2B.8 2C.8 0D.2 4

在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim j As Integer,s As Integer s=1 Do s=s+j j=j+1 Loop Until j>=5 Print s End Sub 程序运行后,单击命令按钮,在窗体上输出的结果是( )。A.11B.1C.16D.7

有如下程序: Private Sub Command1_Click( ) a$="A WORKER IS OVER THERE" x=Len(a $) For i=1 To x-1 b$=Mid $(a $,i,2) If b $="ER"Then s=s+1 Next i Pdnt s End Sub 程序运行后的输出结果是A.1B.2C.3D.4

下面程序运行后,单击命令按钮,输出的结果是______。Private Sub Command1_Click()Dim a%(1 To 5),i%,sFor i=1 To 5a(i) =iNexts=Fun(A)Print "s=";s;End SubFunction Fun(a() As Integer)Dim t,i%t=1For i=LBound(A)To UBound(A)t=t*a(i)NextFun=tEnd Function