Math, asked by AakashKiran, 11 months ago

For a project file I want 20 patterns of square with examples​

Answers

Answered by Ragab20
1

Answer:Input number of rows and columns.

For rows of rectangle run the outer loop from 1 to rows.

for (i = 1; i < = rows; i++)

For column of rectangle run the inner loop from 1 to columns.

for (j = 1; j < = columns; j++)

Print star for first or last row or for first or last column, otherwise print blank space.

After printing all columns of a row, print new line after inner loop.

Similar questions