各位高手幫我做道VB程式設計題,謝謝

2022-12-27 09:40:52 字數 1048 閱讀 1783

1樓:入世遊魂

如果數字是整數可以這樣

x=cint(x)

y=cint(y)

z=cint(z)

或者用clng(x)

使用強制轉換函式就可以了.轉換成你希望的各式

2樓:匿名使用者

摟住瞎說!

通過文字框怎麼就不行了

但一定要用函式val()把文字框的內容轉換一下上面這位大哥不錯

x= val(text1.text)

y = val(text2.text)

z = val(text3.text)

如果你的文字框裡不小心輸入了一個空格什麼的,那就難說哦

3樓:匿名使用者

'多個數排序:

private sub command1_click()dim i as integer

dim j as integer

dim a(6) as long

dim k as long

for i = 0 to 5

a(i) = val(text1(i).text)next

for i = 0 to 4

for j = i + 1 to 5

if a(i) > a(j) then

k = a(i)

else

k = a(j)

a(j) = a(i)

a(i) = k

end if

next

next

label1.caption = a(0) & " " & a(1) & " " & a(2) & " " & a(3) & " " & a(4) & " " & a(5)

end sub

private sub form_load()randomize

dim i as integer

for i = 1 to 6

text1(i - 1).text = clng(100 * rnd() * i)

next

end sub

vb程式設計題,請高手解答

private sub mand1 click dim a as integer,n as integerdim b as integer,m as integerdim c as integer,nc as integerdim i as integer,j as integer,tm as in...

各位,請幫我做一道題。急急急。謝謝啦

1 你聽出了劉阿姨說話的意思是 帶有嘲諷的意思,是說自己的被單被水弄溼了 2 如果你是小明,應該怎樣回答劉阿姨 對不起,劉阿姨!我下次一定會注意!我幫你洗被單。小明正在陽臺上澆花,樓下的劉阿姨說 小明,你真愛美啊,我剛晾的被單也錦上添花了。1 你聽出了劉阿姨說話的意思是 小明澆花的水滴到了劉阿姨剛晾...

一道程式設計題,求高手

如下。include void main int result 4 4 int i,j int sum1 行的和 int sum2 列的和 printf 原來的陣列 n result 3 3 0 for i 0 i 3 i sum1 0 sum2 0 for j 0 j 3 j printf 5d ...