I have to write a race program between a coyote and a road racer. Both start at 1 and the finish line is at 5. Each turn moves until they reach 5. I do not see how to do this using a for loop instead of A do do loop, thank you for helping you.
Private Sub btnStart_Click (sender as object, and as EventArgs) handles btnStart.Click
Dim moves, move, r, c, d as integer
Sun Rand As New Random
r = 1
c = 1
Make up to c = 5 or r = 5 mover = rand.Next (2) If mover = 0 then move = rand.Next (1, 11) If moves <= 6 then r = r + 1 ElseIf moves <= 4 Next r = r + 2 End if End if If the mover = 1 then move = rand.Next (1, 11) If moves <= 6 then c = c + 1 ElseIf moves <= 4 Next c = c + 2 End if End if lstboxSequence.Items.Add (r) .ToString () Loop If r = 5 then lblWinner.Text = ("Roadrunner is the winner!") End if If c = 5 then lblWinner.Text = ("Coyote is the winner!") End if End Sub