for k =1 to 5,怎么算的?private sub command1_click()dim k as integer ,s as single,a as single,b as singlea=val(text1(0).text)s=ab=afor k =1 to 5s=s+val(text1(k).text)if aval(text1(k).text)thenb=val(text1(k).text)end if next ks=(s-a-b)/4s=s*3*val(t
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 15:29:58
for k =1 to 5,怎么算的?private sub command1_click()dim k as integer ,s as single,a as single,b as singlea=val(text1(0).text)s=ab=afor k =1 to 5s=s+val(text1(k).text)if aval(text1(k).text)thenb=val(text1(k).text)end if next ks=(s-a-b)/4s=s*3*val(t
for k =1 to 5,怎么算的?
private sub command1_click()
dim k as integer ,s as single,a as single,b as single
a=val(text1(0).text)
s=a
b=a
for k =1 to 5
s=s+val(text1(k).text)
if aval(text1(k).text)then
b=val(text1(k).text)
end if
next k
s=(s-a-b)/4
s=s*3*val(text2.text)
text3=int(s*100)/100
end sub
for k =1 to 5,怎么算的?private sub command1_click()dim k as integer ,s as single,a as single,b as singlea=val(text1(0).text)s=ab=afor k =1 to 5s=s+val(text1(k).text)if aval(text1(k).text)thenb=val(text1(k).text)end if next ks=(s-a-b)/4s=s*3*val(t
就是从1到5的循环,最开始的时候k=1,下一次2,依次一直到5是最后一次
所以从1到5循环5次