比较两个数的大小
2012-04-28 19:37
267 查看
VERSION 5.00
Begin VB.Form Form1
ClientHeight = 3870
ClientLeft = 60
ClientTop = 345
ClientWidth = 6045
LinkTopic = "Form1"
ScaleHeight = 3870
ScaleWidth = 6045
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "比较"
Height = 735
Left = 1080
TabIndex = 6
Top = 1920
Width = 1575
End
Begin VB.TextBox Text2
Height = 615
Left = 2280
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 360
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.Label Label4
Caption = "N"
Height = 495
Left = 1680
TabIndex = 5
Top = 1080
Width = 495
End
Begin VB.Label Label3
Caption = "M"
Height = 375
Left = 120
TabIndex = 4
Top = 1080
Width = 135
End
Begin VB.Label Label2
Height = 375
Left = 3120
TabIndex = 1
Top = 240
Width = 855
End
Begin VB.Label Label1
Caption = "实现两个数大小的比较,写出最大值"
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 2535
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 M As Integer
Dim N As Integer
M = Val(Text1.Text)
N = Val(Text2.Text)
If M > N Then
Print M
Else
Print N
End If
End Sub
Begin VB.Form Form1
ClientHeight = 3870
ClientLeft = 60
ClientTop = 345
ClientWidth = 6045
LinkTopic = "Form1"
ScaleHeight = 3870
ScaleWidth = 6045
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "比较"
Height = 735
Left = 1080
TabIndex = 6
Top = 1920
Width = 1575
End
Begin VB.TextBox Text2
Height = 615
Left = 2280
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 360
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.Label Label4
Caption = "N"
Height = 495
Left = 1680
TabIndex = 5
Top = 1080
Width = 495
End
Begin VB.Label Label3
Caption = "M"
Height = 375
Left = 120
TabIndex = 4
Top = 1080
Width = 135
End
Begin VB.Label Label2
Height = 375
Left = 3120
TabIndex = 1
Top = 240
Width = 855
End
Begin VB.Label Label1
Caption = "实现两个数大小的比较,写出最大值"
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 2535
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 M As Integer
Dim N As Integer
M = Val(Text1.Text)
N = Val(Text2.Text)
If M > N Then
Print M
Else
Print N
End If
End Sub
相关文章推荐
- C语言比较两个数的大小使用if-else语句和条件运算符
- 比较两个数大小
- 比较两个数的大小
- java--通过键盘录入比较两个数的大小
- 第16周项目二运用指针比较两个数的大小(需调试,不知问题出在哪)
- 使用C语言编写程序,求两个整数的较大值(随机输入两个数,比较大小)
- 5.编写一个程序,有两个类,其中类MAX中具有两个方法,方法名都是max,一个方法能够比较两个数的大小,另外一个方法能够比较三个数的大小。在另外一个类中创建对象,调用这两个方法,分别输出两组数:2、6
- Linux中比较两个数的大小
- 简单java应用程序---比较两个数大小
- Oracle比较两个数的大小
- 两个数大小的比较
- 比较两个数大小
- C语言小试牛刀两个初级程序练习------1到100的加法运算,两个数大小的比较
- 程序员面试宝典p40----不用if比较两个数大小
- 通过调用函数,比较两个数的大小
- C++ 不用判断运算符进行比较两个数的大小
- 比较两个数的大小
- c语言:指针比较两个数的大小
- 不用if比较两个数大小
- 比较两个数的大小