3.(6分) Private Sub Form_Click() Dim A(!To 4)As String D)im c As Integer Dim j As Integer Λ(1)="6” A(2)="8 A(3)="10” A(4)声"12 c=1 Forj=1 To 4 c=c+Val(A(j)) Next j Print c End Sub 写出程序运行时单击窗体后,窗体Form】上的结果。 4.(7分) Function F(n As Integer)As Long Dim i As Integer,Temp As Long Temp=】 For i=1 To n Temp Temp i Next i F=Temp End Function Private Sub Form_Click() Dim k As Integer,nj As Integer k=5 nj=F(k) Print k;"i=";nj End Sub 写出程序运行时,单击窗体Foml上的输出结果。 1380,t.(6分) Private Sub Fornl_ Click() I)i川 A( I "1 'o -I)As String Dine(、As Integer him j As Integer A(1)= s A(2)= s A(3)= "10 A(4)= it 12" (、= 1 For j= 1To4 c= c -I- Val(A(j)) Next j Print c Land Sub 写出程序运行时单击窗体后 ,窗体 Form'上的结果。 4. (7分) Function F(n As Integer) As Long Dimi As Integer, Temp As Long Temp= 1 For 1= 1 To n ,temp= Temp * i Next 1 F = 1'emp End Function Private Sub Forrn_Click() Dim k As Integer,nj As Integer k = 5 n]= F(k) Print k;“1=”;Il] End Sub 写出程序运行时 ,单击窗体 Forml上的输出结果。 1380