下列程序运行后的输出结果是 下列程序运行后的输出结果是 Option base 1Private Sub Command1_Click()Dim a(10),p(3) as integerk=5for i= 1 to10a(i)=inext ifor i=1 to 3p(i)=a(i)*inext ifor i=1 to 3k=k+p(i)*2next iprint kend sub
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 22:01:05
下列程序运行后的输出结果是下列程序运行后的输出结果是Optionbase1PrivateSubCommand1_Click()Dima(10),p(3)asintegerk=5fori=1to10a(
下列程序运行后的输出结果是 下列程序运行后的输出结果是 Option base 1Private Sub Command1_Click()Dim a(10),p(3) as integerk=5for i= 1 to10a(i)=inext ifor i=1 to 3p(i)=a(i)*inext ifor i=1 to 3k=k+p(i)*2next iprint kend sub
下列程序运行后的输出结果是
下列程序运行后的输出结果是
Option base 1
Private Sub Command1_Click()
Dim a(10),p(3) as integer
k=5
for i= 1 to10
a(i)=i
next i
for i=1 to 3
p(i)=a(i)*i
next i
for i=1 to 3
k=k+p(i)*2
next i
print k
end sub
下列程序运行后的输出结果是 下列程序运行后的输出结果是 Option base 1Private Sub Command1_Click()Dim a(10),p(3) as integerk=5for i= 1 to10a(i)=inext ifor i=1 to 3p(i)=a(i)*inext ifor i=1 to 3k=k+p(i)*2next iprint kend sub
k=5
a(1)=1……a(10)=10
p(1)=a(1)*1=1,p(2)=2*2=4,p(3)=9
k=0+p(1)*2=2
k=2+p(2)*2=10
k=10+p(3)*2=28