VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



a function to return the largest number of ten numbers read.

by Brandon (46 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 25th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

a function to return the largest number of ten numbers read.

Rate a function to return the largest number of ten numbers read.



Function ReturnLargest(ByVal i As Integer, ByVal Number As Integer, ByVal MaxNumber As Integer)
MaxNumber = 0
For i = 1 To 10
Number = InputBox("Enter an integer between 1 and 32000", "Number")
Print Number
 If MaxNumber > i Then
    MaxNumber = MaxNumber
 Else
    MaxNumber = Number
 End If
Next i
Print vbNewLine
Print "The largest of these numbers is " & MaxNumber
End Function

Private Sub Command1_Click()
Dim Max, Count, Number, Largest As Integer
Max = ReturnLargest(Count, Number, Largest)
End Sub

Download this snippet    Add to My Saved Code

a function to return the largest number of ten numbers read. Comments

No comments have been posted about a function to return the largest number of ten numbers read.. Why not be the first to post a comment about a function to return the largest number of ten numbers read..

Post your comment

Subject:
Message:
0/1000 characters