1樓:匿名使用者
private sub ***mand1_click() '生成20個20~80之間隨機數,按每行5個數輸出到窗體
me.cls
dim a(20)
dim i as integer
for i = 0 to 19
randomize
a(i) = int(rnd * (80 - 20 + 1)) + 20
if i > 0 and i mod 5 = 0 then
end if
print a(i),
next i
end sub
private sub form_click()
me.cls
dim max, min, i, j, a(10), sum as integer
dim aver as single
a(0) = 15: a(1) = 23: a(2) = 72: a(3) = 43: a(4) = 96
a(5) = 23: a(6) = 3: a(7) = 65: a(8) = 88: a(9) = 17
max = a(0): min = a(0): sum = a(0)
for i = 1 to 9
if max < a(i) then
max = a(i)
end if
if min > a(i) then
min = a(i)
end if
sum = sum + a(i)
aver = format(sum / 10, "0.00")
next i
print "max = " & max, "min = " & min, "aver =" & aver
end sub
vb題目求大佬解答
2樓:匿名使用者
sub stradd(s1 as string, s2 as string)
dim temp as string
static i as integer
i = i + 1
temp = mid(s1, i, 1)
if temp <> "" then call stradd(s1, s2)
s2 = s2 & temp
end sub
sub main()
dim s2 as string
call stradd("abcdef", s2)debug.print s2
end sub
結果是倒序字串
你可以f8單步跟蹤就能明白。
vb題目,一道大學vb題,求教大佬。
3樓:又喝太多了
這個。。。。。完全就是內建函式讀取檔案到陣列,再寫入檔案啊,難點在哪呢?
4樓:陽光的凌寶寶
做系統是為了讓電腦更加人性化,任何電腦必須有一個系統,
5樓:匿名使用者
剛剛吃飯呀剛吃好v個哈哈v分析出
vb題 求大佬幫忙
6樓:匿名使用者
private sub ***mand1_click()dim i as integer
for i = 0 to 9
list1.list(i) = 10 + int(rnd * 90)next
end sub
private sub ***mand2_click()list2.clear
dim i as integer
for i = 0 to 9
if list1.list(i) mod 2 = 0 thenlist2.additem list1.list(i)list1.removeitem i
i = i - 1
end if
if i = list1.listcount - 1 then exit for
next
end sub
一道vb程式設計題目,求大佬解答!!
7樓:匿名使用者
^private sub ***mand1_click()dim i as integer
for i = 11 to 999
if i = strreverse(i) and i ^ 2 = strreverse(i ^ 2) and i ^ 3 = strreverse(i ^ 3) then
print i, i ^ 2, i ^ 3end if
next
end sub
一道vb題目,求大神幫忙,急一道vb題目,求大神幫忙!
這個彎路繞大了,36!3.71993e 41,是個億億億億億級的數字,vb中沒有什麼資料型別能精確存放它的結果,而36 7 36 7 只需要算 36 35 34 33 32 31 30 1 2 3 4 5 6 7 就行了。記住你了,以後再也不會鳥你的問題了,回答我也刪除掉 急求一道vb程式設計題答案...
求大神解答VB上機題目
dim rnddata 1 to 30 as integerprivate sub command1 click dim i as integer picture1.cls for i 1 to 30 randomize rnddata i int 99 rnd 1 next for i 1 to ...
求人解這VB題目,VB的題目 幫幫我吧
vb題目求解 完整 如下 dim s1,s2,l as doubledim i as integer l 1 s1 0 for i 1 to 24 s1 s1 1000 l i 1 next i s2 0 for i 1 to 24 s2 s2 1000 i 1 100next i if s1 s2...