Question: Write a recursive function that takes as a parameter a nonnegativeinteger and generates the following patterns of stars. If thenonnegative integer is 4, then the
****
***
**
*
*
**
***
****
Also write a program that prompts the user to enter the number oflines in the pattern and uses the recursive function to generatethe pattern. For example, specifying 4 as the number of linesgenerates the above pattern.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
