I have a form that has 3 text boxes for 3 input values, along with a list box for output. I need the user to be able to input 3 different numbers and click a button to find the average. I’m not really sure how to do/approach this. Any help is greatly appreciated.
Still Stuck….
Private Sub btnAverage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAverage.Click Dim a As Integer = CInt(txtone.Text) Dim b As Integer = CInt(txtTwo.Text) Dim c As Integer = CInt(txtThree.Text) Dim average As Integer average = (a + b + c) / 3 lstOutput.Text = average
Are you unsure about how to convert the input to numbers? If so use the CInt function.