Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void barres(int n) {
- if (n > 2) barres(n-1);
- cout << "*" << endl;
- if (n != 1) {
- for (int i = n; i > 0; --i) cout << "*";
- cout << endl;
- }
- }
- int main() {
- int n;
- for (cin >> n; n > 0; --n) barres(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement