Pattern Program
Pattern Program
Pattern:
Steps
1.
now When i= 1 and now j=2, inner condition fails, cursor moves next line.
now When i= 2 and j=2, condition true , one more * in second row.
now When i= 2 and j=3, condition fails, breaks inner loops, cursor moves to 3 rd
row
now.
Steps
Divide into row and columns.
row is same, no change , column starts from 4 now and slowly decreases.
J=4 to j>=1
i=2 and j=1 now condition is false, cursor moves to new line.
i=3 and j=4 again
Prints two *
Notes