1樓:匿名使用者
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
print "* ";
next
next
end sub
跪求大神幫忙用vb程式寫這道題!!!
2樓:
private sub command1_click()dim ts as integer,tv0 integer, tv1 as integer,ta as integer,tt as integer
tv0=40*1000/3600
tt=2*60
'先化簡,統一各單位 v=40km/h=100/9 m/s ,a = 0.15 m/s, t=120 s
tv1=tv0+ta*tt '由公式v2=v1+at得ts=tv0*tt+ta*(tt)^2/2 '由公式s=v0t+at^2/2得
text1.text=tv1 '2min後速度vtext2.text=ts '距開始點的距離send sub
『必要的話可以進行單位換算
求大神幫忙編下這道vb題!!
3樓:匿名使用者
給個郵箱,做好了發給你
4樓:
還簡單的功能,可以自己先做,不會的再問
5樓:天涯客家學子
付費找人做,很快搞定。
6樓:諸ge辰
還不算太難,可以自己做
求vb大神幫寫一道vb的程式題
7樓:匿名使用者
option explicit
private sub command1_click()dim d(1 to 10) as integerdim i as integer
dim n as integer
dim x as integer
dim mymax as integer
dim kmax as integer
dim t as integer
randomize
n = 0
do while n < 10
x = int(rnd * 90 + 10)for i = 1 to n
if x = d(n) then exit fornext i
if i > n then
n = n + 1
d(n) = x
end if
loop
me.cls
'輸出陣列
for i = 1 to 10
print d(i),
next i
'尋找最大值並輸出下標
mymax = d(1)
kmax = 1
for i = 2 to 10
if d(i) > mymax then
mymax = d(i)
kmax = i
end if
next i
print "最大值:" & mymax
print "在第" & kmax & "元素裡。"
'交換元素的值
for i = 1 to 5
t = d(i)
d(i) = d(10 - i + 1)
d(10 - i + 1) = t
next i
'再次輸出陣列
for i = 1 to 10
print d(i),
next i
end sub
8樓:聽不清啊
private sub command1_click()randomize
dim a(10) as integer
print "原來的陣列:"
for i = lbound(a) to ubound(a)a(i) = int(100 * rnd()): print a(i);
next
abc a()
end sub
sub abc(a() as integer)max = lbound(a())
for i = lbound(a) to ubound(a)if a(i) > a(max) then max = inext
print "max:"; "a("; max; ")="; a(max)
print: print "逆置陣列後:"
i = lbound(a)
j = ubound(a)
while i < j
t = a(i): a(i) = a(j): a(j) = ti = i + 1: j = j - 1
wend
for i = lbound(a) to ubound(a)print a(i);
next
end sub
求大神幫忙寫一下這道vb題
9樓:聽不清啊
private sub form_click()for i = 1 to 5
print tab(6 - i); string(2 * i - 1, "*"); " "; string(2 * (5 - i) + 1, "*")
next i
end sub
求大神幫忙編下這道vb題!!
10樓:
給個郵箱,做好了發給你
-----------------------------------
**已發,**是我找的,你自己把**換一下
關於vb的題目,求幫寫下**……謝謝大神 10
11樓:匿名使用者
private sub form_load()timer1.interval = 100timer1.enabled = trueend sub
private sub timer1_timer()dim c1 as integer, c2 as integer, c3 as integer
dim s as integer
label1.left = label1.left + 10c1 = int(rnd * (255 - 1))c2 = int(rnd * (255 - 1))c3 = int(rnd * (255 - 1))s = int(rnd * (32 - 8 + 1) + 8)label1.
fontsize = s
label1.forecolor = rgb(c1, c2, c3)end sub
12樓:道家元始天尊
你要的東西我幫你弄好了,記得採納
求vb大神幫忙做一道題。要求;只需要要程式寫出來,介面的截圖;
13樓:匿名使用者
基本思路,是把數字作為字串處理,然後運算的時候,先把它擷取成長度一定的(比如4位)若干段,分段轉換成數字求和(要考慮進製),然後轉換成字元,在連線起來輸出:
介面如下:
**如下:
option explicit
private sub command1_click()
dim ssss as string
ssss = ppp(text1.text, text2.text)
text3.text = ssss
end sub
'自定義函式求兩個長整數之和
private function ppp(byval s1 as string, byval s2 as string) as string
dim dd1() as string
dim n1 as integer
dim dd2() as string
dim n2 as integer
dim s as string
dim i as integer
dim d1 as integer
dim d2 as integer
dim t as integer
dim j as integer
dim jinwei as boolean
dim k as integer
dim ss1 as string
dim ss2 as string
if len(s1) > len(s2) then
ss1 = s1
ss2 = s2
else
ss1 = s2
ss2 = s1
end if
n1 = 0
s = ss1
do while len(s) > 4
n1 = n1 + 1
redim preserve dd1(1 to n1) as string
dd1(n1) = right(s, 4)
s = left(s, len(s) - 4)
loop
n1 = n1 + 1
redim preserve dd1(1 to n1) as string
dd1(n1) = s
n2 = 0
s = ss2
do while len(s) > 4
n2 = n2 + 1
redim preserve dd2(1 to n2) as string
dd2(n2) = right(s, 4)
s = left(s, len(s) - 4)
loop
n2 = n2 + 1
redim preserve dd2(1 to n2) as string
dd2(n2) = s
jinwei = false
k = 0
for i = 1 to n1
k = k + 1
if k > n2 then exit for
if not jinwei then
t = val(dd1(i)) + val(dd2(k))
else
t = val(dd1(i)) + val(dd2(k)) + 1
end if
if len(cstr(t)) > 4 then
jinwei = true
else
jinwei = false
end if
dd1(i) = right(cstr(t), 4)
next i
if jinwei then
for i = n2 + 1 to n1
if jinwei then
t = val(dd1(i)) + 1
else
t = val(dd1(i))
end if
if len(cstr(t)) > 4 then
jinwei = true
else
jinwei = false
end if
dd1(i) = right(cstr(t), 4)
next i
end if
ppp = ""
for i = n1 to 1 step -1
ppp = ppp & dd1(i)
next i
if jinwei then ppp = "1" & ppp
end function
求高手用VB編寫下題 給出年,月,日,求該日是該年的第幾天
dim day,month,year,sum,leap day 天,month 月,year 年 select case month 先計算2月沒有29天時某月以前月份的總天數 case 1 sum 0 case 2 sum 31 case 3 sum 59 case 4 sum 90 case 5...
求問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 ...
vb簡單問題求大神們幫幫忙
vb6.0做的 你改改 dim t as integer private sub text1 change text1.text 的ascii為 tend sub private sub text1 keypress keyascii as integer t keyascii end sub 求大...
求vb大神啊 vb語言不會啊 幫忙解答一下
private sub text1 keypress keyascii as integer if len trim text1.text 0 and keyascii 13 then if not isnumeric text1.text then msgbox 你輸入的不是數字,請重新輸入 te...
一道vb題目求大神幫忙, 急 一道vb題目,求大神幫忙!
如題目原文如此,則程式沒有問題,完全正確。具體要看題目的要求。比如 奇數日通行 還是 偶數日限行 急 一道vb題目,求大神幫忙!這個彎路繞大了,36!3.71993e 41,是個億億億億億級的數字,vb中沒有什麼資料型別能精確存放它的結果,而36 7 36 7 只需要算 36 35 34 33 32...