Question: Write a C + + program that has recursive function called printStar 1 ( ) that takes as a parameter a non - negative integer

Write a C++ program that has recursive function called printStar1() that takes as a parameter a non-negative integer and generate the following pattern of stars (shown below). It will be a void function. Do not use any global or static variables in your recursive function.
If the function printStar1() is passed a value of 5, here is the output.
*****
****
***
**
*
Add another recursive function called printStar2() that works almost the same as printStar1() as explained in Question 2A.
However, this time, if the function printStar2() is passed a value of 5, here is the output.
*****
****
***
**
*
**
***
****
*****

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!