Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void vivod(int n, char a) {
- for (int i = 1; i <= n; ++i) {
- cout << a;
- }
- }
- void F(int i, int n, int k) {
- if (k == 90) {
- vivod(i, ' ');
- vivod(n, (char)k);
- vivod(i, ' ');
- cout << endl;
- }
- if (k < 90) {
- vivod(i, ' ');
- vivod(n, (char)k);
- vivod(i, ' ');
- cout << endl;
- F(i + 1, n - 2, k + 1);
- vivod(i, ' ');
- vivod(n, (char)k);
- vivod(i, ' ');
- cout << endl;
- }
- }
- int main() {
- F(0, 80, 65);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement