vb.net - Visual Basic - Taking user input, storing in array, and displaying in Windows Forms -


I did some Java programming last year, but I started Visual Basic this year and for some reason my head around Can not wrap Windows Forms Application

This is a homework assignment, here's the question:

Write a program that accepts five input values ​​and stores them in an array . The program should display five numbers in a reverse order using a loop. The program should then use the calculation of average of five numbers in a function, then display all the numbers in the array that are larger than the average of the five numbers.

Here is the code I have written so far Any help to finish this program would be greatly appreciated

Option Turn On

Public Class Form1

  Personal sub-outputButton_Click (As in this object, E EventArgs) outputButton.Click 'variable handles are as dense fiveNumbers (4) integers are IsNumeric (FirstNumTextBox.Text) and IsNumeric (SecondNumTextBox.Text) _ And IsNumeric (ThirdNumTextBox.Text) and IsNumeric (FourthNumTextBox.Text) _ and IsNumeric (.text as FifthNumTextBox) then fiveNumbers (0) = CInt (FirstNumTextBox.Text) fiveNumbers (1) = CInt (SecondNumTextBox.Text) fiveNumbers (2) = CInt (ThirdNumTextBox.Text) fiv ENumbers (3) = CInt (FourthNumTextBox.Text) fiveNumbers (4) = CINT (Fifth NewTX box. Text) and 'for I for Intel = Step-1' to 5 = 5Numbers (i) CInt ( CInt (ReverseTextBox.Text) .toString) = 'Next End Sub Function Average (in the form of fiveNumbers () integer) as double average = (fiveNumbers (0) + fiveNumbers (1) + five points (2) _ + five Returns (= 3) + Five points (4)) / 5 Average Returns = 0 to 4 Phase 1 if five points (i) & gt; The average then ends if the next end function  

the end class


Comments