题库 题库

【简答题】

Dim num
Private Sub Command1_Click()
    Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
'    num = ?
    If num < 60 Then
        If Option1.Value = True Then
            Text2.Text = num
        Else
            If (num / 10 = CInt(Int(num / 10))) Then
'                Text2.Text = Text2.Text + ?
            End If
      End If
    Else
        Text2.Text = 0
        num = 0
'        Text1.Text = Text1.Text + ?
    End If
End Sub

参考答案

Dim num
Private Sub Command1_Click()
    Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
    num = num + 1
    If num < 60 Then
        If Option1.Value = True Then
            Text2.Text = num
        Else
            If (num / 10 = CInt(Int(num / 10))) Then
                Text2.Text = Text2.Text + 10
            End If
      End If
    Else
        Text2.Text = 0
        num = 0
        Text1.Text = Text1.Text + 1
    End If
End Sub

相关试题