在 VB 2010 中執行下列程式片段,按下 Button1 後,請問跳出的訊息方塊依序分別顯示什麼數值? Function bmi1(ByVal w As Single, ByVal h As Single)As Single h = h / 100 bmi1 = w / h ^ 2 End Function Sub bmi2(ByRef w As Single, ByRef h As Single, ByRef bmi As Single) h = h / 100 bmi = w / h ^ 2 End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs)Handles Button1.Click Dim h1, w1, h2, w2, ans1, ans2 As Single h1 = 150 w1 = 45 h2 = 150 w2 = 45 ans1 = 0 ans2 = 0 ans1 = bmi1(w1, h1) Call bmi2(w2, h2, ans2) MsgBox(h1) MsgBox(h2) MsgBox(ans1) MsgBox(ans2) End Sub , , ,
新北市市立淡水商工・104學年 定期評量・第 251 題・由 Siao 提供
解答
答案
150 1.5 20 20
- A1.5 1.5 20 20 , , ,
- B150 150 20 0 , , ,
- C150 150 20 20 , , ,
- D150 1.5 20 20正解
只收錄到一次,沒有別的答案可以比對
本頁的解題說明由 我去不早說(apps.siao.ai)整理
其他答案
這一題只收錄到一次,所以沒有別的答案可以比對。
留言
還沒有人留言。登入後就能補上答案或指出錯誤。