#include <stdio.h>
void print_hollow_rectangle(int total_stars) {
for (int i = 1; i <= total_stars; i++) {
for (int j = 1; j <= total_stars; j++) {
if (i == 1 || i == total_stars || j == 1 || j == total_stars) {
printf("*");
}
else {
printf(" ");
}
}
printf("\n");
}
}
int main() {
print_hollow_rectangle(7);
return 0;
}
/*
run:
*******
* *
* *
* *
* *
* *
*******
*/