分析得出10个数中最大的数

来源:互联网 发布:mac os 最新的版本号 编辑:程序博客网 时间:2024/05/21 17:50

VERSION 5.00
Begin VB.Form Form1
   Caption         =   "分析得出10个数中最大的数"
   ClientHeight    =   4380
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7005
   LinkTopic       =   "Form1"
   ScaleHeight     =   4380
   ScaleWidth      =   7005
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1
      Caption         =   "分析"
      Height          =   735
      Left            =   4680
      TabIndex        =   4
      Top             =   720
      Width           =   1335
   End
   Begin VB.TextBox Text2
      Height          =   495
      Left            =   2400
      TabIndex        =   3
      Top             =   1560
      Width           =   735
   End
   Begin VB.TextBox Text1
      Height          =   735
      Left            =   2280
      TabIndex        =   2
      Top             =   240
      Width           =   735
   End
   Begin VB.Label Label2
      Caption         =   "B"
      Height          =   615
      Left            =   360
      TabIndex        =   1
      Top             =   1440
      Width           =   1215
   End
   Begin VB.Label Label1
      Caption         =   "A"
      Height          =   615
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i(8) As Integer

Private Sub Command1_Click()
 
  Private Function max() As Integer
 
  Dim i(1 To 10) As Integer
 
  f(i) = Int(Rnd * 100 + 7)
 
 
 
 
 
 
 
 
 
End Function

Private Sub Form_Load()

Dim A As Integer
Dim B As Integer
A = Text1.Text
B = Text2.Text
 
 If A > B Then
 Print A
 Else: Print B
 End If
 
Dim i(8) As Integer
For i = 0 To 7
A(i) = Int(Rnd * 100 + 6)
Dim max As Integer
max = A(i)
Function max (A(i)) as Integer

 

 

 


End If

 

 

 

 

 

 

 

 

 

 

 

 

End Sub