分析3个数中最大的数

VERSION 5.00
Begin VB.Form Form1
   Caption         =   "分析3个数中最大的数"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1
      Caption         =   "分析"
      Height          =   735
      Left            =   3240
      TabIndex        =   6
      Top             =   600
      Width           =   975
   End
   Begin VB.TextBox Text3
      Height          =   615
      Left            =   1800
      TabIndex        =   5
      Top             =   2040
      Width           =   735
   End
   Begin VB.TextBox Text2
      Height          =   375
      Left            =   1800
      TabIndex        =   4
      Top             =   1080
      Width           =   615
   End
   Begin VB.TextBox Text1
      Height          =   495
      Left            =   1680
      TabIndex        =   3
      Top             =   120
      Width           =   735
   End
   Begin VB.Label Label3
      Caption         =   "C"
      Height          =   615
      Left            =   240
      TabIndex        =   2
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label2
      Caption         =   "B"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   855
   End
   Begin VB.Label Label1
      Caption         =   "A"
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()

Dim A As Integer
Dim B As Integer
Dim C As Integer

A = Text1.Text
B = Text2.Text
C = Text3.Text
 
If A > B Then
Max = A
Else: Max = B
End If
   If C > Max Then
 Print C
 Else: Print Max
  End If
 

 

 

 

 

 

 

 

 

 

 

 

 

 

End Sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值