Question: Stuck on a Recursion practice Problem. How does the implementation work on each input? void fun1(int n) { int i = 0; if (n >
Stuck on a Recursion practice Problem. How does the implementation work on each input?
void fun1(int n) { int i = 0; if (n > 1) fun1(n-1); for (i = 0; i < n; i++) cout << " * "; }
A.)How many stars will be printed with fun1(4)?
B.) How many stars will be printed with fun1(10)?
C.) How many stars will be printed with fun1(100)?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
