[填空題] 在窗體上畫(huà)一個(gè)命令按鈕,其名稱(chēng)為command1,然后編寫(xiě)如下代碼: Option Base 1 Private Sub Command1_ Cli
2021-07-20
[填空題] 在窗體上畫(huà)一個(gè)命令按鈕,其名稱(chēng)為command1,然后編寫(xiě)如下代碼: Option Base 1 Private Sub Command1_ Click() Dim Arr Arr = Array(43, 68f -25, 65, -78, 12, -79, 43, -94, 72) pos = 0 neg = 0 For k = 1 To 10If Art(k) > 0 ThenElseEnd If Next k Print pos, neg End Sub以上程序的功能是,計(jì)算并輸出數(shù)組Arr中10個(gè)數(shù)的整數(shù)之和pos與負(fù)數(shù)之和neg,請(qǐng)?zhí)羁铡?/p>正確答案:
pos = pos + Arr (k) neg = neg + Arr (k)
詞條內(nèi)容僅供參考,如果您需要解決具體問(wèn)題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢(xún)相關(guān)領(lǐng)域?qū)I(yè)人士。