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