单击一次命令按钮后,下列程序的执行结果是 Private Sub Command1_Click() s=P(1) +P(2) +P(3) +P(4) Print s End Sub Public Function P(N As Integer) Static Sum For i=1 To N Sum=Sum+i Next i P=Sum End FunctionA.15B.25C.35D.45

单击一次命令按钮后,下列程序的执行结果是 Private Sub Command1_Click() s=P(1) +P(2) +P(3) +P(4) Print s End Sub Public Function P(N As Integer) Static Sum For i=1 To N Sum=Sum+i Next i P=Sum End Function

A.15

B.25

C.35

D.45


相关考题:

单击一次命令按钮后,下列程序的执行结果是( )。 Private Sub Commandl_Click() s=P(1)+P(2)+P(3)+P(4) Print s End Sub Public FunctionP(N As Integer) Static Sum Fori=1To N Sum=Sum+i Nexti P=Sum End FunctionA.15B.25C.35D.45

单击一次命令按钮后,下列程序的执行结果是Private Sub Command1_Click()s=P(1) + P(2) + P(3) + P(4)Print sEnd SubPublic Function P(N As Integer)Static SumFor i=1 To NSum=Sum + iNext iP=SumEnd Function( )。A.15B.25C.35D.45

在窗体画一个命令按钮,然后编写如下事件过程:Private Sub Command1_CIick()Dim a(1 To 10)Dim p(1 To 3)k=5For i =1 To 10a(i)=iNext iFor i=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。

下列程序的执行结果是______。PrivateFunctionP(NASInteger)Fori=1 To NSUM=SUM+iNextiP=SUMEnd FunctionPrivte Sub Commandl_Click()S=P(1)+P(2)+P(3)+P(4)Print SEnd Sub

单击命令按钮之后,下列程序代码的执行结果为______。 Private Function P(N As Integer) Static sum For I=I To N Sum = sum +1 Next I P =sum End Function Private Sub Command1_Click() S=P(1)+P(2)+P(3)+P(4) Print S: End SubA.20B.30C.115D.135

单击一次命令按钮之后,下列程序代码的执行结果为 private Sub Command1_Click() S=P(1) +P(1)+P(2)+P(3)+P(4) Print S: End Sub Public Function P(N As Integer) Static Sum For I=1 To n Sum=Sum+I Next 1 P=Sum End FunctionA.20B.35C.115D.135

|在窗体中有一个命令按钮Commandl,编写事件代码如下: Private Sub Commandl_Click( ) Dim SAsIntegerS=P(1)+P(2)+P(3)十P(4)debu9.Print SEnd SubPublic Function PfN AS Integer)Dim Sum As IntegerSum=0Fori=l ToNSum=Sum+iNextiP=SumEnd Function打开窗体运行后,单击命令按钮,输出结果是( )。【程序设计综合知识】A.15B.20C.25D.35

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl_Click()Dim a (1 To 10)Dim p(1 To 3)k=5For i=1 To 10a(i)=iNextiFori=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。

执行下面程序段后,s的结果是 。 int a[]={2,3,4}; int s,i,*p; s=1; p=a; for(i=0;i<3;i++) s*=*(p+i);