Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a recursive function that takes as a parameter a nonnegative integer and g

ID: 3628482 • Letter: W

Question

Write a recursive function that takes as a parameter a nonnegative integer and generates the following pattern of stars. If the nonnegative integer is 4, then the pattern generated is:

****
***
**
*
*
**
***
****

Also, write a program that prompts the user to enter the number of lines in the pattern and uses the recursive function to generate the pattern. For example, specifying 4 as thse number of lines generates the above pattern


2.Write a recursive function that takes as a parameter a nonnegative integer and generates the following pattern of stars. If the nonnegative integer is 4, then the pattern is generated is:

*
**
***
****
****
***
**
*

Also,write a program that prompts the user to enter the number of lines in the pattern and uses the recursive function to generate the pattern.

Explanation / Answer

#include #include void display1(int a) { int d; static int c=1; if (c>0) for(d=0;d
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote