title: Visual Basic - Taking user input, storing in array, and displaying in Windows Forms
body: <p>I did some java programming last year, but I've started Visual Basic this year and for some reason cannot wrap my head around Windows Forms Apps. </p>
  
  <p>It is a homework assignment, here is the question: </p>
  
  <p>Write a program that accepts five input values and stores them into an array. The program should display those five numbers in reverse order using a loop. The program should then use a function calculate the average of the five numbers, then display all the number in the array that are larger than the average of the five numbers.</p>
  
  <p>Here is the code I have written so far, any help to finish this program would be greatly appreciated</p>
  
  <p>Option Strict On</p>
  
  <p>Public Class Form1</p>
  
  <pre><code>Private Sub outputButton_Click(sender As Object, e As EventArgs) Handles outputButton.Click
  
      'Variables
      Dim fiveNumbers(4) As Integer
  
      If IsNumeric(FirstNumTextBox.Text) And IsNumeric(SecondNumTextBox.Text) _
          And IsNumeric(ThirdNumTextBox.Text) And IsNumeric(FourthNumTextBox.Text) _
          And IsNumeric(FifthNumTextBox.Text) Then
  
          fiveNumbers(0) = CInt(FirstNumTextBox.Text)
          fiveNumbers(1) = CInt(SecondNumTextBox.Text)
          fiveNumbers(2) = CInt(ThirdNumTextBox.Text)
          fiveNumbers(3) = CInt(FourthNumTextBox.Text)
          fiveNumbers(4) = CInt(FifthNumTextBox.Text)
      End If
  
      'For i As Integer = 4 To 0 Step -1
      'fiveNumbers(i) = CInt(CInt(ReverseTextBox.Text).ToString)
      'Next
  
  End Sub
  Function average(fiveNumbers() As Integer) As Double
      average = (fiveNumbers(0) + fiveNumbers(1) + fiveNumbers(2) _
          + fiveNumbers(3) + fiveNumbers(4)) / 5
      Return average
  
      For i As Integer = 0 To 4 Step 1
          If fiveNumbers(i) &gt; average Then
  
          End If
      Next
  
  End Function
  </code></pre>
  
  <p>End Class</p>