1樓:匿名使用者
dim rnddata(1 to 30) as integerprivate sub command1_click()dim i as integer
picture1.cls
for i = 1 to 30
randomize
rnddata(i) = int(99 * rnd() + 1)next
for i = 1 to 5
picture1.print rnddata((i - 1) * 6 + 1) & " " & rnddata((i - 1) * 6 + 2) & " " & rnddata((i - 1) * 6 + 3) & " " & rnddata((i - 1) * 6 + 4) & " " & rnddata((i - 1) * 6 + 5) & " " & rnddata((i - 1) * 6 + 6)
picture1.print
next
end sub
private sub command2_click()dim i as integer
dim datasub as integerfor i = 1 to 30
datasub = datasub + rnddata(i)next
text1.text = datasub
end sub
private sub command3_click()dim i as integer
dim datamax as integerdatamax = rnddata(1)
for i = 1 to 30
if rnddata(i) > datamax thendatamax = rnddata(i)
end if
next
text2.text = datamax
end sub
private sub command4_click()dim i as integer
dim datamin as integerdatamin = rnddata(1)
for i = 1 to 30
if rnddata(i) < datamin thendatamin = rnddata(i)
end if
next
text3.text = datamin
end sub
2樓:小羅哥
option explicit
dim k1 as integer, k2 as integer, k3 as integer, k4 as integer, k5 as integer
private sub command1_click()randomize
k3 = 0
for k1 = 1 to 50
k2 = int(rnd() * 99 + 1)k3 = iif(k3 > k2, k3, k2)if k1 = 1 then
k4 = k2
else
k4 = iif(k4 > k2, k2, k4)end if
k5 = k5 + k2
label1.caption = label1.caption & k2 & " "
next
end sub
private sub command2_click()text1.text = k5
end sub
private sub command3_click()text2.text = k3
end sub
private sub command4_click()text3.text = k4
end sub
VB題目,求大佬,如圖,vb題目求大佬解答
private sub mand1 click 生成20個20 80之間隨機數,按每行5個數輸出到窗體 me.cls dim a 20 dim i as integer for i 0 to 19 randomize a i int rnd 80 20 1 20 if i 0 and i mod 5...
一道vb題目,求大神幫忙,急一道vb題目,求大神幫忙!
這個彎路繞大了,36!3.71993e 41,是個億億億億億級的數字,vb中沒有什麼資料型別能精確存放它的結果,而36 7 36 7 只需要算 36 35 34 33 32 31 30 1 2 3 4 5 6 7 就行了。記住你了,以後再也不會鳥你的問題了,回答我也刪除掉 急求一道vb程式設計題答案...
求數學大神解答一下,數學題目求大神解答。
你可以這樣試一下,連線bc,組合成三角形abc,因為be垂直平分ac,根據等腰三角形的三線合一,所以三角形abc為等腰三角形,所以ab bc.又因為cd垂直平分ab,同理可得三角形abc為等腰三角形,所以ac bc.所以ac ab 數學題目求大神解答。甲乙兩車第一次相遇,共同行駛完一個全程,甲車行駛...