Question: Create a cpp file named 'main.cpp' that defines an int function named PS() that takes an int array parameter and an int parameter named data
Create a cpp file named 'main.cpp' that
defines an int function named PS() that takes an int array parameter and an int parameter named data and n respectively. Given that n represents the size of data, the function returns the sum positive values (> 0) in data.
defines the main function that
initializes an int array of size 10 with random values such that some values are not positive.
displays a PS() caller whose arguments are the int array and 10 respectively.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
