Question: You are going to write a void function named stars that takes one integer parameter. If the value of that parameter is greater than 0,

 You are going to write a void function named stars that

You are going to write a void function named stars that takes one integer parameter. If the value of that parameter is greater than 0, the stars0 function should print out that many asterisks( character) on a line, followed by an endl. If the value of the parameter is less than or equal to 0, no output should be generated. A main0 function is provided to test your code. Your function should not have any cin statements in it. The output must match what you see in the sample runs exactly. User input is shown in bold italics. Sample run 1: 4 56 Sample run 2: 82 YOUR ANSWER We recommend you take a quick tour of our editor before you proceed. The timer will pause up to 90 seconds for the tour. Start tour For help on how to read input and write output in C++,click here Original Code C++ 1 B #include 2 using namespace std; 4 /I Write your stars function here 5int main()

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!