// Pantea Aria // nested loops // 1. Write a C program that prints a 30×40 square of stars. // 2. The program asks the user for the number of rows and columns, // then prints row x column rectangle of stars. #include int main(void) { int row, col; printf ("Enter row and col:"); scanf ("%d %d", &row, &col); // print out one row of stars // if col = 5 you want to print ***** // I want to repeat row times // declare outer_counter int outer_counter = 0; while (outer_counter < row) { // to declare your inner_counter int inner_counter = 0; while (inner_counter < col) { printf ("*"); inner_counter = inner_counter + 1; } printf ("\n"); outer_counter = outer_counter + 1; } return 0; }