题库 题库

【简答题】

参考答案

Private Sub Command1_Click()
    Const PI = 3.14159
    Select Case Combo1.Text
        Case "sin": a = Sin(CInt(Text1.Text) * PI / 180)
        Case "cos": a = Cos(CInt(Text1.Text) * PI / 180)
        Case "tg": a = Tan(CInt(Text1.Text) * PI / 180)
        Case "ctg": a = 1 / Tan(CInt(Text1.Text) * PI / 180)
'        Case "tg": a = Sin(CInt(Text1.Text) * PI / 180) / Cos(CInt(Text1.Text) * PI / 180)
'        Case "ctg": a = Cos(CInt(Text1.Text) * PI / 180) / Sin(CInt(Text1.Text) * PI / 180)
    End Select
    Text2 = Int(a * 1000) / 1000
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Call mysub
End Sub

相关试题