請問這道VB題怎麼做,請問這道題怎麼做

時間 2022-09-23 01:46:03

1樓:匿名使用者

你的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, c, m as doublea = cdbl(textbox1.text)b = cdbl(textbox2.text)c = cdbl(textbox3.

text)m = max(a, b, c) / (max(a + b, b, c) * max(a, b, b + c))

label1.text = m.tostring()或者print m

2樓:蘭墨真建德

當前視窗高度等於當前視窗高度+1000。你想幹?

3樓:巢柏甘素昕

直接在窗體雙輸入以下**就可以了。

private

subcommand1_click()

me.height

=me.height

+1000

me.width

=me.width

+1000

me.left

=me.left

-500

me.top

=me.top

-500

endsub

private

subcommand1_keydown(keycodeasinteger,

shift

asinteger)

ifkeycode=27

then

me.height

=me.height

-1000

me.width

=me.width

-1000

me.top

=me.top

+500

me.left

=me.left

+500

endif

endsub

private

subcommand2_click()

me.height

=me.height

-1000

me.width

=me.width

-1000

me.top

=me.top

+500

me.left

=me.left

+500

endsub

private

subcommand2_keydown(keycodeasinteger,

shift

asinteger)

ifkeycode=27

then

me.height

=me.height

-1000

me.width

=me.width

-1000

me.top

=me.top

+500

me.left

=me.left

+500

endif

endsub

4樓:庚晗崔雪冰

private

subcommand1_click()

me.height

=me.height

+1000

me.width

=me.width

+1000

me.left

=me.left

-500

me.top

=me.top

-500

endsub

private

subcommand1_keydown(keycodeasinteger,

shift

asinteger)

ifkeycode=27

then

me.height

=me.height

-1000

me.width

=me.width

-1000

me.top

=me.top

+500

me.left

=me.left

+500

endif

endsub

private

subcommand2_click()

me.height

=me.height

-1000

me.width

=me.width

-1000

me.top

=me.top

+500

me.left

=me.left

+500

endsub

private

subcommand2_keydown(keycodeasinteger,

shift

asinteger)

ifkeycode=27

then

me.height

=me.height

-1000

me.width

=me.width

-1000

me.top

=me.top

+500

me.left

=me.left

+500

endif

endsub

請問這道題怎麼做

5樓:安徽新華電腦專修學院

a^b 是a的b次方 2*2*2*2*2=32 結果為32

請問這道vb題怎麼做??

6樓: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

這道題應該怎麼做?

7樓:牛牛憶城

第一次取到0個新球的概率為c(9,0)c(6,3)/c(15,3)=20/455 1

第一次取到1個新球的概率為c(9,1)c(6,2)/c(15,3)=135/455 2

第一次取到2個新球的概率為c(9,2)c(6,1)/c(15,3)=216/455 3

第一次取到3個新球的概率為c(9,3)c(6,0)/c(15,3)=84/455 4

第二次在上面各種情況下取得三個新球的概率分別為

c(9,3)c(6,0)/c(15,3)=84/455 5

c(8,3)c(7,0)/c(15,3)=56/455 6

c(7,3)c(8,0)/c(15,3)=35/455 7

c(6,3)c(9,0)/c(15,3)=20/455 8

對應相乘,例如第一次取得0個新球若第二次取得三個新球的概率就是1式乘以5式為(20/455 )*(84/455)= 1680/455的平方,依次2與6的相乘,3與7,4與8,最後將這四個數加起來就是 0.08926 。

這道vb題怎麼做?

8樓:聽不清啊

atn(1)的值是π/4

所以,4*atn(1)的值是π

4*atn(1)>3.14 的值為真,「真」在vb中的值為-1所以,sgn(f)的值為-1

但是,最後的p,在程式中未出現過,其值只能作為0處理,照這樣的話,j的值就是0。

不知道只取題目的一部分是什麼意思?(題目本身也沒有輸出,也沒有任何問題?)

9樓:網海1書生

這題目本身有錯啊,最後那個p應該是pi才對吧?

4*atn(1) = 4*(π/4) = π = 3.1415926...

所以 f = 4*atn(1)>pi = 3.1415926... >3.14 = true = -1

j = sgn(f) * pi = sgn(-1) * 3.14 = -1 * 3.14 = -3.14 = -3 (j是整數變數,所以會自動取整)

求問VB大神這道題怎麼做, VB 請問這道題怎麼做的? 求步驟 謝謝

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 print for i 1 to 9 print 第 i 趟選擇排序 k i for j ...

這道題怎麼做,請問這道題怎麼做?

你好應該是 生吞活剝 據 漢語成語小詞典 p325 請問一下,這道題怎麼做?如圖 簡析 有色圖形為原操場示意圖,白色部分為擴大部分示意圖。相鄰邊長分別擴大12公尺後,得到三個圖形,即乙個邊長為12公尺的正方形和兩個寬為12公尺的相等的長方形。而白色長方形的長,也就是原操場的邊長。解答 第一步,求原操...

76 782這道題怎麼做,請問這道題怎麼做?

76.782約等於多少,要根據精確到多少位來確定答案。也就是根據四捨五入的原則,精確到不同的位數答案不同,可以有多種答案。76.782 76.78 精確到百分位 76.782 76.8 精確到十分位 76.782 77 精確到個位 76.782 80 精確到十位 使用去尾法或四捨五入法精確到百分位是...

這道題怎麼做,嗯,請問這道題怎麼做?

設蟲為x鐘為y花為z 所以3x 21 x 7 2y x 19 y 6 x y z 15 z 2 所以x z y 7 12 19 下面蟲子多了一節,所以結果是,算式7 2 1 2 2 5 26。由第乙個式子,蟲 花 7 代入二式可得 六點 6 代入三式,一朵花 2 四式中,蟲多一節,應為6,兩朵花應為...

請問這道數學題怎麼做?請問這道數學題應該怎麼做?

利用等價無窮小代換來求。3個 的和尾數是7,0 9中只有9可以,進製2,所以3個 和的尾數是5,所以 是5,進1之後,3個 的和是7,應該是2 相當於乙個各個數字不相同的三位數,乘以3之後得777,那就簡單的用777除以3就好了嘛,得到259,所以正確答案就是。提問列式計算的結果是錯誤的。列式計算的...