Our loop demonstration program contains the following loop:
For i = 0 To 9
   txtOut.AppendText(strNames(i) & vbCrLf)
Next

What would happen if:
  1. The For statement were changed to:   For i = 0 To 8
  2. The For statement were changed to:   For i = 0 To 10
  3. The For statement were changed to:   For i = 0 To 9 step 2
  4. The For statement were changed to:   For i = 0 To 9 step 14
  5. The For statement were changed to:   For i = 0 To 9 step -1
  6. The assignment statement were changed to:   txtOut.AppendText(strNames(i))
  7. The assignment statement were changed to:   txtOut.AppendText(strNames(j) & vbCrLf)
Explain your answers.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.