Untitled
unknown
plain_text
3 years ago
550 B
11
Indexable
#include <iostream>
using namespace std;
int main() {
char a, b;
int x, y;
cout << "Input first character,second character and size of rectangle (a b x y)" << endl;
cin >> a >> b >> x >> y;
for (int i = 0; i < x; i++){
cout << a << ' ';
}
cout << endl;
for (int i = 0; i < y-2; i++){
cout << a << ' ';
for (int j = 0; j < x-2; j++){
cout << b << ' ';
}
cout << a << endl;
}
for (int i = 0; i < x; i++) {
cout << a << ' ';
}
}Editor is loading...