1樓:匿名使用者
private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.
click
dim m(100) as integerdim n(128) as integerrandomize()
for i = 0 to 99
m(i) = rnd() * 127
n(m(i)) = n(m(i)) + 1next
dim txt as string=""
for i = 48 to 58
txt += chr(i) & " : " & n(i) & vbcrlf
next
for i = 65 to 90 'a-ztxt += chr(i) & " : " & n(i) + n(i + 32) & vbcrlf
next
label1.text=txt
end sub
vb題目 輸出5 5的矩陣,其中元素是隨機生成的1 100的整數
private sub command1 click randomize form1.cls dim c,e as integer c 0 e 0 dim d as double d 1 dim a 4,4 as stringfor i 0 to 4 for j 0 to 4 f format in...
VB編寫,產生隨機二位整數,存入陣列中,計算總和,將陣列元素按升序排序,並按每行列印輸出
被計算機2級考試折磨的可憐娃兒 private sub form load dim mr 1 to 50 as byte,x as byte dim i as long,j as long,t as long,b as boolean dim so as string 產生50個隨機二位整數 ran...
vb隨機輸出兩位整數,並求出最大值,最小值
private sub command1 click dim max as integer,maxi as integer,min as integer,mini as integer dim a 10 as integer randomize for i 1 to 10 a i int 99 10...