Okay I've been trying to understand this question for hours and I am very desperate. The question is:
Write a program segment in the following subroutine, that initially ask for a 2 digit positive integer from the user, checks for invalid entries, responds with the second screenshot on the right for non numeric entries, and responds with the original question form for numeric entries that are outside the specified range. The rest of the program provides the output in the textbox, the first line will show the number entered, increments the number entered by 6 and writes the result as long as it is less than 100, last line shows that if it is incremented by 6 once again it will be over 100.
What I done so far:
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
Dim number, result As Integer
number = InputBox("Please enter a two digit number")
If IsNumeric(number) = False Then
MsgBox("That is not a number")
InputBox("Please enter again")
End If
TextBox1.Text = "Starting with" & number & vbCrLf
Do Until result >= 100
result = number + 6
TextBox1.Text = TextBox1.Text & result & vbCrLf
Loop
Any suggestions appreciated
Quote:
Write a program segment in the following subroutine, that initially ask for a 2 digit positive integer from the user, checks for invalid entries, responds with the second screenshot on the right for non numeric entries, and responds with the original question form for numeric entries that are outside the specified range. The rest of the program provides the output in the textbox, the first line will show the number entered, increments the number entered by 6 and writes the result as long as it is less than 100, last line shows that if it is incremented by 6 once again it will be over 100.
Quote:
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
Dim number, result As Integer
number = InputBox("Please enter a two digit number")
If IsNumeric(number) = False Then
MsgBox("That is not a number")
InputBox("Please enter again")
End If
TextBox1.Text = "Starting with" & number & vbCrLf
Do Until result >= 100
result = number + 6
TextBox1.Text = TextBox1.Text & result & vbCrLf
Loop