Hi I am a newb but I am an AS student who has tried with the assignment that follows:
A program that will allow examination scores (out of 100) to be typed in and will display the grade for each score, in descending order. Grades are awarded as follows: Between 0-39= U, 40-59=C 60-79=B 80-100=A.
The program then displays the results in desending order and then will ask the user wether they will The program will check that all numbers entered are valid whole numbers between 0 and 100"
I have designed the visuals just the code I am difficulty with
Public Class Form1
Dim maths As String = TextBox3.Text
Dim science As String = TextBox1.Text
Dim english As String = TextBox2.Text
Dim Score1 As String = TextBox4.Text
Dim Score2 As String = TextBox6.Text
Dim Score3 As String = TextBox7.Text
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
if <= 39 If <= 40 Thenmsgbox.Text = ("U") end if >=40
if <= 40 if <59 thenmsgbox.Text = ("C") end if >=60
if <=60 if <=79 thenmsgbox.text = ("B") end if >=80
if <=80 if <=100 then msgbox.text = ("A") end if >100 then msgbox.text = ("Error")
End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged
if <= 39 If <= 40 Thenmsgbox.Text = ("U") end if >=40
if <= 40 if <59 thenmsgbox.Text = ("C") end if >=60
if <=60 if <=79 thenmsgbox.text = ("B") end if >=80
if <=80 if <=100 then msgbox.text = ("A") end if >100 then msgbox.text = ("Error")
End Sub
Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged
if <= 39 If <= 40 Thenmsgbox.Text = ("U") end if >=40
if <= 40 if <59 thenmsgbox.Text = ("C") end if >=60
if <=60 if <=79 thenmsgbox.text = ("B") end if >=80
if <=80 if <=100 then msgbox.text = ("A") end if >100 then msgbox.text = ("Error")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox4.Text = TextBox5.Text & maths
TextBox5.Text = TextBox5.Text & " " & science
TextBox7.Text = TextBox5.Text & " " & english
End Sub
End Class