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(text2.text)text3=int(s*100)/100end sub
问题描述:
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
答