幫幫忙,請教幾道VB的選擇題

2021-07-09 16:39:11 字數 2010 閱讀 3551

1樓:駱浩閃靈珊

1、樓上的答案有點問題

這裡每個if語句都要執行判斷,不要把它理解成elseif你應該是把它錯誤理解成

ifa>90

then

i=4elseif

a>80

then

i=3elseif

a>70

then

i=2elseif

a>60

then

i=1print

"i=";i

如果是elseif,到第三個判斷a>70,if語句就結束,i=2這裡是4個if語句,當判斷a>70以後,還會執行ifa>60

then

i=1,所以a=1

你可以用以下**來驗證,可以看出每一個判斷語句後i的變化a=75i=0

ifa>

90theni=

4msgboxiif

a>80theni=

3msgboxiif

a>70theni=

2msgboxiif

a>60theni=

1msgboxi2、

a=1;b=2;c=3

a=a+b:b=b+c:c=b+a

'a=1+2=3,b=2+5=5,c=5+3=8ifa<>3

orb<>3

then

'b<>3

a=b-a:b=c-a:c=b+a

'a=5-3=2,b=8-2=6,c=2+6=8endif

print

a+b+c

'a+b+c=2+6+8=16

2樓:

(1)198.56

(2)cdef

(3)1

(4)123445

(5)16(字串中的空格也算一個)

(6)0

(7)20

(8)x=1:y=1:z=1

(9)2

(10)strconv

(11)y=x+30

(12)a

(13)1

(14)10

(15)12334

另外說一下,你的這些題中很多錯誤,很多雙重引號,vb中不是雙重引號轉譯的,另外引號應該是半形英文的雙引號,你這些題都是中文的引號,vb是不認識的

3樓:fm網路

問題 2 1 分 儲存

"執行以下語句: a$=""abcdefghijk"" print mid(a, 3, 4) 輸出結果是:"

cdef

4樓:匿名使用者

1... 198.56

2....cdef

3....1

4....123445

5....15

6....0

7....20

8....x=1:y=1:z=1

9....2

10...strconv

11...y=x+30

12...12

13...1

14...10

15...12334

有沒有大神知道這個圖形用vb程式怎麼做,拜託拜託幫幫忙。還有下面那道驗證猜想的題。求助大神幫幫忙啊

5樓:匿名使用者

private sub command1_click()dim i as integer

for i = 9 to 1 step -1print spc(i); string((2 * (9 - i) + 1), format(i))

next

end sub

6樓:古舟蓑笠翁

for i = 9 to 1 step -1for j = i to 1 step -1print " ";

next j

for j = 1 to (10 - i) * 2 - 1print trim(i);

next j

print

next i

英語選擇題大家幫幫忙啊

c 可以理解為定語從句some photos which are taken in beijing.省略which are。也可以理解為非謂語動詞短語做定語。c.定語從句省略了which is some photos which are taken in beijing.c taken 定語後置 以...

一道選擇題,不會做,幫幫忙

b 選a的of和 s都代表 的 的意思,重複 整句話的意思是sam走去敲門,發現了鄰居家的小傢伙坐在墊子附近 排除a,find 後面要加名詞或代詞,或者句子,不能加to do,found the crying boy of the neighbor s 沒問題 sat 用錯了,應該是sitting ...

出了幾道數學題,幫幫忙吧

1 6x 噸 5x 噸 2 17a 元 3a 元 3 4x65 260千米 540 260 280千米 280 4 70千米 時 設乙車每小時行x千米。4x65 4x 540 260 4x 540 260 4x 260 540 260 4x 280 4x 4 280 4 x 70 答 乙車每小時行7...