Write a function called printStars. The function receives a parameter containing an integer value. If the parameter
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a function called printStars. The function receives a parameter containing an integer value. If the parameter is positive, the funciton prints (to standard output) the given number of asterisks. Otherwise the function does nothing. The function does not return a value. Thus, if printStars(8) is called, ******** (8 asterisks) will be printed. The function must not use a loop of any kind (for, while, do-while) to accomplish its job. Instead, it should examine its parameter, returning if the parameters value is not positive. If the parameter is positive, it: prints a single asterisk (and no other characters) then crecursively calls itself to print the remaining asterisks
Related Book For
Posted Date: