12345678910111213141516171819
#include<iostream> using namespace std; void pattern(int n) { if(n == 1) { cout << '*' << endl; cout << '*' << endl; } else { for(int i = 1; i <= n; i++) cout << '*'; cout << endl; pattern(n-1); for(int i = 1; i <= n; i++) cout << '*'; cout << endl; }