Question
write a c++ program. a. Define an array named numbers with a maximum of 20 integer values, and fill the array with numbers assigned by
write a c++ program.
a. Define an array named numbers with a maximum of 20 integer values, and fill the array with numbers assigned by your program. Have your main() function call a function named split()that reads the array and places all zeros or positive numbers in an array named positive and all negative numbers in an array named negative. The split()function should take three array references and the size of the numbers array as input. Finally, have your split() function invoke a function named display()that receives references to both negative and positive arrays as well as the size of each array as input then displays the values in both the positive and negative arrays to the console. Below is an example test run of my solution. Your programs output must look like this:
The list of numbers before the split:
12 4 76 -3 -6 9 0 -21 234 675 98 87 45 -34 82 68 17 -2 -1 -6
The positive array is:
12 4 76 9 0 234 675 98 87 45 82 68 17
The negative array is:
-3 -6 -21 -34 -2 -1 -6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started