程序設计教程第三版实验答案.docVIP

  • 5
  • 0
  • 约3.04千字
  • 约 6页
  • 2017-06-08 发布于重庆
  • 举报
程序設计教程第三版实验答案

Private Sub Command1_Click() If Val(Text1) 1000 Then Text2 = Text1 ElseIf 1000 = Val(Text1) And Val(Text1) 2000 Then Text2 = 0.9 * Val(Text1) ElseIf 2000 = Val(Text1) And Val(Text1) 3000 Then Text2 = 0.8 * Val(Text1) Else Text2 = 0.7 * Val(Text1) End If End Sub Private Sub Command2_Click() Text1 = Text2 = Text1.SetFocus End Sub Private Sub Command1_Click() Dim a, b, c a = Val(Text1) b = Val(Text2) c = Val(Text3) If b * b - 4 * a * c 0 Then MsgBox 该一元二次方程无解, , 警告 Text1 = Text2 = Text3 = Text1.SetFocus ElseIf b * b - 4 * a * c = 0 Then Text4 = -b / 2 * a Text5 = -b / 2 * a Else Text4 =

文档评论(0)

1亿VIP精品文档

相关文档