#include <iostream>
using namespace std;
int main() {
// 1st rectangle
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 10; ++j) {
if (
i == 0 || i == 4 ||
j == 0 || j == 9
) {
cout << "*";
} else {
cout << " ";
}
}
cout << endl;
}
cout << endl;
// 2nd rectangle (filled)
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 10; ++j) {
cout << "*";
}
cout << endl;
}
}
Comments
Leave a comment