Assume the availability of a function called printStars. The function receives an int argument. If the argument is positive, the function prints (to standard output) the given number of asterisks. Thus, if the printStars(8) is called, ******** (8 asterisks) will be printed. Assume further that the variable starCount has been declared and initialized to a positive integer. Write some code that prints starCount asterisks to standard output by: first printing a single asterisk (and no other characters) then calls printStars to print the remaining asterisks.

Assume the availability of a function called printStars. The function receives an int argument. If the argument is positive, the function prints (to standard output) the given number of asterisks. Thus, if the printStars(8) is called, ******** (8 asterisks) will be printed. Assume further that the variable starCount has been declared and initialized to a positive integer. Write some code that prints starCount asterisks to standard output by: first printing a single asterisk (and no other characters) then calls printStars to print the remaining asterisks.

LANGUAGE: C++

CHALLENGE:

Assume the availability of a function called printStars. The function receives an int argument. If the argument is positive, the function prints (to standard output) the given number of asterisks. Thus, if the printStars(8) is called, ******** (8 asterisks) will be printed. Assume further that the variable starCount has been declared and initialized to a positive integer. Write some code that prints starCount asterisks to standard output by: first printing a single asterisk (and no other characters) then calls printStars to print the remaining asterisks.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level