Nested loop.
nested loop loop within a loop. use of nested loop #include<stdio.h> int main() { int n; printf("enter the number of rows :"); scanf("%d", &n); for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ printf("*"); } printf("\n"); } return 0; } output : enter the number of rows :9 ********* ********* ********* ********* ********* ********* ********* ********* ********* -------------------------------- Process exited after 4.613 seconds with return value 0 Press any key to continue . .