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

1 Expert Approved Answer
Step: 1 Unlock

To achieve the task of rearranging the array such that all negative numbers come to the front while ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!