Write a program in a new file called split.cpp which reads a list of numbers int
ID: 3532541 • Letter: W
Question
Write a program in a new file called split.cpp which reads a list of numbers into an array, splits the list into a list of negative numbers and a list of non-negative numbers, each in their separate arrays, and then outputs the arrays of negative and non-negative numbers. A negative integer is one that is strictly less than 0. All other integers are non-negative integers. The program should use the command new to allocate arrays of exactly the correct size.The program should have a function count() for counting the number of negative elements and the number of non-negative elements of an array, a function split() for splitting the list into negative and non-negative lists, and a function print_array() for printing an array of numbers.
Explanation / Answer
This program can be coded more efficiently using linked list....will that work for u??
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.