以上幾個VB題目怎麼做,求Vb高手做幾個VB題目

2022-05-07 01:30:22 字數 1579 閱讀 8291

1樓:匿名使用者

考試的麼???????????????????

求vb高手做幾個vb題目

那位大俠幫我做幾個vb(visual basic)的題目啊,很基礎,但我不會

2樓:匿名使用者

你看前兩題這樣做行不?

第一題:

dim i as integer

dim sum as long

i = 0

sum = 0

while i <= 100

i = i + 1

if (i mod 5 = 0) or (i mod 7 = 0) then sum = sum + i

wend

第二題:

dim i as integer

dim j as integer

for i = 1 to 4

for j = 1 to 2 * i - 1print "*";

next j

print

next i

3樓:

1.private sub command1_click()i = 1

while i <= 100

if i mod 5 = 0 or i mod 7 = 0 then sum = sum + i

i = i + 1

wend

print sum

end sub

2.private sub command1_click()for i = 1 to 7 step 2for j = 1 to i

print "*";

next

print

next

end sub

3.private sub command1_click()f1 = 1

f2 = 1

sum = 2

dofn = f1 + f2

f1 = f2

f2 = fn

sum = sum + fn

loop until fn = 144

print sum

end sub

4.private sub command1_click()for i = 3 to 300 step 3sum = sum + i

next

print sum

end sub

5.private sub command1_click()p = 1

for i = 10 to 20

for j = 2 to i - 1

if i mod j = 0 then exit fornext

if j = i then p = p * inext

print p

end sub

4樓:媒

2.for i = 1 to 4

for j= 1 to 2*i-1

print "*";

next j

print

next i

用vb怎麼做,怎麼用vb做一個簡單的程式

option explicit private sub command1 click 顯示當前日期 text1.text format now,yyyy mm dd end sub private sub command2 click 顯示當前時間 text2.text format now,hh ...

這道高數題目該怎麼做,這道CPA題目怎麼做

詳細過程如圖,希望過程能夠幫到你解決問題 這道cpa題目怎麼做?d。同一控制下長期股權投資初始入賬價值是相對於最終控制方而言,等於對最終控制方來說的賬面價值加上最終控制方收購被合併方形成的商譽。第一步先算商譽 3500 4000 80 300.第二步 算賬面價值。對於甲來說 和乙的合併是非同一控制形...

VB練習題答案,急求急求。根本不知道該怎麼做

1 b 2 b 3 a 4 b 5 b 6 b 7 b 8 c 9 c 10 c 11 b 12 a 13 b 14 b 15 b17 b18 d 1 b 2 b 3 a 4 b 5 b 6 b 7 b 8 c 9 c 10 c 11 b 12 a 13 b 14 b 15 b17 b18 d 希望...