#include <iostream>
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) {
std::cout << "*";
}
else {
std::cout << " ";
}
}
std::cout << "\n";
}
}
int main() {
print_hollow_rectangle(7);
}
/*
run:
*******
* *
* *
* *
* *
* *
*******
*/