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 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
include using namespace std function that takes an ... View full answer
Get step-by-step solutions from verified subject matter experts
