facing some problem in making a pattern of square
Pattern of making a square
@praveen-123,
For a square pattern:
The pattern is of N rows and columns containing stars. Here, you need to iterate through N rows, and for each row iterate for N columns.
- To iterate through rows, run an outer loop from 1 to N.
- To iterate through columns, run an inner loop from 1 to N. Inside inner loop print *.
- After printing all columns of a row move to next line i.e. print a new line.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.