Question: Write a C++ program to read user input of 10 integer numbers and stores them into an array. Write your code to rearrange the array
Write a C++ program to read user input of 10 integer numbers and stores them into an array. Write your code to rearrange the array by moving all negative numbers to the front, without changing the original order of the negative and positive numbers.
e.g.
input :
43
54
-65
-54
24
65
-76
-21
45
6
output: -65 -54 -76 -21 43 54 24 65 45 6
Step by Step Solution
There are 3 Steps involved in it
To achieve the task of rearranging the array such that all negative numbers come to the front while ... View full answer
Get step-by-step solutions from verified subject matter experts
