1樓:聽不清啊
private sub command1_click()dim a(10) as integer
randomize
for i = 1 to 10
a(i) = int(rnd * 90) + 10print a(i);
next i
for i = 1 to 9
print "第" & i & "趟選擇排序:";
k = i
for j = i + 1 to 10
if a(j) < a(k) then k = jnext j
t = a(i): a(i) = a(k): a(k) = tprint "【";
for j = 1 to 10
print a(j);
if j = i then print "】";
next j
next i
end sub
private sub command2_click()clsend sub
private sub command3_click()endend sub
2樓:匿名使用者
你什麼時候要?怎麼發給你?
(vb) 請問這道題怎麼做的? 求步驟 謝謝 50
3樓:匿名使用者
f函式中的 x引數是傳址 改變x值就會改變帶入時的變數的值y=f函式返回的值 =x*y=20*2=40x在f函式中被修改了值 所以x=20
答案c已經結貼無法回答 就在此回答你上一題的疑問列表選項序號從0開始 所以序號1 即第二個選項內容
請問這道vb題怎麼做??
4樓:vb程式設計解放雙手
準備3張**,分別是紅燈亮,黃燈亮和綠燈亮時的**!,在視窗中拖入乙個timer控制項,乙個**控制項,2個按鈕,乙個標籤!
在timer事件中編寫**就好了!
dim n as long, m as long
private sub command1_click()
timer1.enabled = true
end sub
private sub command2_click()
timer1.enabled = false
end sub
private sub form_load()
n = 10
m = 0 '0代表紅燈亮,1代表黃燈亮,2代表綠燈亮
picture1.picture = vb.loadpicture("c:\紅燈亮.jpg")
label1.autosize = true
label1.font.size = 24
label1.caption = n
label1.forecolor = vbred
me.caption = "模擬交通燈"
command1.caption = "開始"
command2.caption = "暫停"
timer1.enabled = false
timer1.interval = 1000
end sub
private sub timer1_timer()
if m = 0 then
if n = 10 then
picture1.picture = vb.loadpicture("c:\紅燈亮.jpg")
end if
label1.caption = n
label1.forecolor = vbred
n = n - 1
if n = 0 then
m = 1
n = 3
end if
exit sub
end if
if m = 1 then
if n = 3 then
picture1.picture = vb.loadpicture("c:\黃燈亮.jpg")
end if
label1.caption = n
label1.forecolor = vbyellow
n = n - 1
if n = 0 then
m = 2
n = 10
end if
exit sub
end if
if m = 2 then
if n = 10 then
picture1.picture = vb.loadpicture("c:\綠燈亮.jpg")
end if
label1.caption = n
label1.forecolor = vbgreen
n = n - 1
if n = 0 then
m = 0
n = 10
end if
exit sub
end if
end sub
這道數學題怎麼做?求大神
證明題步驟過多,稍微簡略點啊。1 因為等邊三角形abc,所以 a c 60度,ac bc ab,因為be af,所以ae cf,所以三角形aec全等於三角形cfb,所以ce bf 2 因為三角形aec全等於三角形cfb,所以 ace cbf,又因為 bpc ace pfc,所以 bpc pfc cb...
求VB大神幫忙寫下這題的VB程式
private sub command1 click dim i as integer,j as integerfor i 1 to 9 step 2print spc 2 i for j 10 i to 1 step 1print next print spc 4 for j 1 to i pri...
請問這道VB題怎麼做,請問這道題怎麼做
你的function 沒問題,但是要稍稍改一下 1.function max byval a as double,byval b as double,byval c as double as double 2.在end function 上面加一句return c再把如下 放入按鈕 dim a,b,...
求大佬,,這道化學題怎麼做,大佬看看這道化學題
涉及到的有關的反應 cao h2o ca oh 2 nahco3 ca oh 2 caco3 naoh h2o na2co3 ca oh 2 caco3 2 naoh 反應發生後,溶液中的ca2 co32 hco3 反應發生後,溶液中ca2 co32 hco3 全部轉化為沉澱.將水分蒸乾,得到白色固...
求大神教我怎麼做,vb程式設計,求大神教我怎麼做,vb程式設計
private sub commandbutton1 click dim i as integer,j as integer,intrank 6 as integer,t for i 2 to 7 range g i value range c i value 2 0.6 range h i val...