爱问知识人 爱问教育 医院库

VB编程 简易计算器

首页

VB编程 简易计算器

请用VB编程语言实现一个简易计算器,该计算器不仅可以计算加减乘除,还包含一些简单函数,截图如下:

提交回答

全部答案

    2018-03-29 11:14:22
  •   Private Sub cmdAns_Click()
        Dim s As Double
        If IsNumeric(Text1。Text) And IsNumeric(Text2。Text) _
          And Not ((Combo1。
      Text = "÷" Or Combo1。Text = "Mod") And Val(Text2) = 0) Then Select Case Combo1。Text Case "+" s = Val(Text1) + Val(Text2) Case "-" s = Val(Text1) - Val(Text2) Case "×" s = Val(Text1) * Val(Text2) Case "÷" s = Val(Text1) / Val(Text2) Case "Mod" s = Val(Text1) Mod Val(Text2) End Select Label1。
      Caption = Str(s) Else Label1。Caption = "输入错五!" If Not IsNumeric(Text1。Text) Then Text1。
      SetFocus Else Text2。SetFocus End If End If 。

    马***

    2018-03-29 11:14:22

类似问题

换一换
  • 程序设计 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):