Write a program that displays the sum of the squares given the range of integers by the user.
This is what I got. The problem is that it won't display anything.
Private Sub btnAnswer_Click(sender As Object, e As EventArgs) Handles btnAnswer.Click
Dim Sum As Object
Dim Last As String
Dim Num As Object
Dim First As String
First = CInt(txtFirst.Text)
Last = CInt(txtLast.Text)
Sum = 0
Do
Sum = Sum + Num * Num
Num = Num + 1
Loop Until Num > Last
End Sub
End Class
This is what I got. The problem is that it won't display anything.
Private Sub btnAnswer_Click(sender As Object, e As EventArgs) Handles btnAnswer.Click
Dim Sum As Object
Dim Last As String
Dim Num As Object
Dim First As String
First = CInt(txtFirst.Text)
Last = CInt(txtLast.Text)
Sum = 0
Do
Sum = Sum + Num * Num
Num = Num + 1
Loop Until Num > Last
End Sub
End Class