c++, data structure
Write a recursive function that draws the following figure for n= 4
****
***
**
*
**
***
****
Solution
#include <iostream>using namespace std;void print_line(int n) { if (n > 0) { cout << “*”; print_line(n-1); } else { cout << endl; }}void print_pattern(int n) { if (n == 1) { print_line(n); } else {
OR
OR