下面是一個利用副程式來進行加,減運算的程式片段,請依照提示,
在主程式中的空格處,填上正確的程式敘述內容
Private Sub Button1_Click(…) Handle Buttl.Clck
Dim X, Y As Single, choice As Short
X = InputBox("請輸入X值:")
Y = InputBox("請輸入Y值:")
choice = InputBoox("請選擇運算方式,1)加法 2)減法: ")
If choice =1 Then Call _________________
If choice =2 Then Call _________________
End Sub
Sub Add(ByVal a As Single. ByVal b As Single)
Label1.Text = a + b
End Sub
Sub Add(ByVal a As Single. ByVal b As Single)
Label1.Text = a - b
End Sub
請問空格答案
If choice =1 Then Call _________________
If choice =2 Then Call _________________
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.
留言列表