|
-
Dec 15th, 2007, 03:32 PM
#1
Thread Starter
New Member
Messagebox Display
Hi All,
Of course im a newbie but I need help as time is of the essence. Im trying to do a lab that will obtain 10 numbers from the user using an InputBox() function, store them internally in a one-dimensional array, and then compute the average of the numbers and sort them in reverse numerical order. The program should control that 10 numbers (no more, no less) are entered, and that the numbers are fully validated as integers. If the user enters non-numeric data, then an appropriate error message should be shown, and that number should be allowed to be re-entered as a valid number. Then all the numbers should be shown as a list in a 'message box'.
So far I can get everything but the message box to show the list of numbers entered. Can someone help.
Code:
Dim binp As Array
Dim bavg As Double
Dim bsort As Integer
Dim arrList As New ArrayList()
Dim intcount As Integer
Private Sub btnput_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnput.Click
binp = Array.CreateInstance(GetType(Integer), 10)
For intcount = 1 To 10
InputBox("Enter a number")
Next
For intcount = 1 To 10
MsgBox("The numbers you entered are:", MsgBoxStyle.OkOnly, "Numbers Entered")
Next
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|