Question: 1. Create a program with the function balls(int n). The balls function will print n rows, having on each an increasing number of balls.

1. Create a program with the function balls(int n). The balls function will print n rows, having on each an

1. Create a program with the function balls(int n). The balls function will print n rows, having on each an increasing number of balls. So if the function is called like this: balls(3), it will print: O OO 000 In the main function, there will be a for loop, that will go from 2 to 4, calling to the function balls passing the value of the control variable, so it will produce the next pattern: O OO O OO OOO O SOO 000 0000

Step by Step Solution

3.36 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include using namespace std function that takes an ... View full answer

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 Programming Questions!