急求VB程式設計答案

2021-03-11 22:15:46 字數 1324 閱讀 8675

1樓:匿名使用者

private a(1 to 1000) as integer, b(1 to 1000) as integer, n as integer

private sub ***mand1_click()text1.text = ""

randomize

for i = 1 to 20

a(i) = int(rnd * 101) + 100text1.text = text1.text & a(i) & ","

next i

n = 20

call sort1

end sub

private sub sort1()

text2.text = ""

for i = 1 to n

b(i) = a(i)

next i

for i = 1 to n

for j = i + 1 to n

if b(i) < b(j) then

dd = b(j)

b(j) = b(i)

b(i) = dd

end if

next j

text2.text = text2.text & b(i) & ","

next i

end sub

2樓:青松踏雪

private sub ***mand1_click()text1 = ""

text2 = ""

dim a(9) as integer

for i = 0 to 9

a(i) = rnd() * 100 + 100for j = 1 to i '判斷來重自復出

bai現

duzhi

if a(j) = a(i) then

a(i) = rnd() * 100 + 100end if

next j

next i

for i = 0 to 9

text1 = text1 & a(i) & ","

next i

'排序dao

for i = 0 to 9

for j = 1 + i to 9

if a(i) > a(j) then

temp = a(i)

a(i) = a(j)

a(j) = temp

end if

next j

next i

for i = 0 to 9

text2 = text2 & a(i) & ","

next i

end sub

VB程式設計急求,急求VB程式設計程式碼!!!!

private sub command1 click 計算應發工資,text4 text4 val text1 val text2 val text3 計算個人所得稅,text5 if val text4 1000 thentext5 0 elseif val text4 1000 and val ...

急求VB程式設計

呵呵,估計只有這裡題目會是 1000萬 因為這樣就溢位了,並且老師上課是按1000演示的,我這裡也是1000記錄的。老師筆記 是按1000來的 private sub command1 click dim n,pingfang,diwei as doublefor k 3 to 1000 pingf...

一道vb程式設計題目急求答案,一道C 程式設計題目 急求答案

private sub form load text1.left 0 text1.top 0 text1.width me.scalewidth 2 text1.height me.scaleheight 2 command1.left me.scalewidth command1.width co...