I need to make a program for finding out the greater number among 10 numbers, that are entered by the user using only for.. next loop. This is the code I'm using but it isn't working:
Dim a, b, c As Integer
a = 0
For b = 1 To 10
c = InputBox("Enter a number")
a = a + c
If a > c Then
a = c
End If
Next b
MsgBox ("The greatest value = " & a)
Dim a, b, c As Integer
a = 0
For b = 1 To 10
c = InputBox("Enter a number")
a = a + c
If a > c Then
a = c
End If
Next b
MsgBox ("The greatest value = " & a)