Nested Loops
For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next j picOutput.Print Next i
******
For i = 1 To 5 For j = 1 To 6 picOutput.Print "*" Next j picOutput.Print Next i
************************************************************
For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next j picOutput.Print; Next i
******************************
For i = 1 To 5 For j = 1 To 6 picOutput.Print tab(j);"*"; Next j picOutput.Print Next i
******
For i = 1 To 5 For j = 1 To 6 picOutput.Print tab(j);"*" Next j picOutput.Print Next i
*
For i = 1 To 5 For j = 1 To 6 picOutput.Print tab(2*j);“*”; Next j picOutput.Print Next i
* * * * * *
For i = 1 To 5 For j = 1 To 6 picOutput.Print tab(2*j);“*”; Next j picOutput.Print; Next i
* * * * * *
For i = 1 To 5 For j = 1 To 6 picOutput.Print tab(i);“*”; Next j picOutput.Print Next i
*
For i = 1 To 5 For j = 1 To 6 picOutput.Print tab(i*j);“*”; Next j picOutput.Print; Next i
******
For i = 1 To 5 For j = 1 To 6 If(i<j) Then picOutput.Print “*”; End If Next j picOutput.Print Next i
***** **** *** ** *
For i = 1 To 5 For j = 1 To 6 If(i<=j) Then picOutput.Print “*”; End If Next j picOutput.Print Next i
****** ***** **** *** **
For i = 1 To 5 For j = 1 To 6 If(i>=j) Then picOutput.Print “*”; End If Next j picOutput.Print; Next i
* ** *** **** *****
star = "*" For i = 1 To 5 picOutput.Print star star = star & "*" Next i
* ** *** **** *****
For i = 1 To 5 For j = 1 To 6 If(i=j) Then picOutput.Print “*”; Else picOutput.Print “#”; End If Next j picOutput.Print Next i
*##### #*#### ##*### ###*## ####*#
For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next j For k = 1 To 3 picOutput.Print "#"; Next k picOutput.Print Next i
******###
For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; For k = 1 To 3 picOutput.Print "#"; Next k Next j picOutput.Print Next i
*###*###*###*###*###*###
size=6 For i = 1 To size picOutput.Print "*"; Next i picOutput.Print For i = 1 To size - 2 picOutput.Print "*"; For j = 1 To size - 2 picOutput.Print " "; Next j picOutput.Print "*" Next i For i = 1 To size picOutput.Print "*"; Next i
****** * ******
Size = 6 For i = 1 To Size For j = 1 To Size If (i = 1 Or i = Size) Then picOutput.Print "*"; ElseIf (j > 1 And j < Size) Then picOutput.Print " "; Else picOutput.Print "*"; End If Next j picOutput.Print Next i
Syntax error For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next i picOutput.Print Next j
Correct!, but hard to read! For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next j picOutput.Print Next i