THE EXERCISE OF THE GUYS GUYS HAS BEEN MOVED TO THE MENU "EXERCISE OF Teacher"

Separation of yin and yang in the array

Threads: For an array of n integers. Printed on 2 line respectively negative and positive numbers of the sequence.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: two lines, line on the positive, the bottom line is the negative numbers in sequence. The number written in order as the original array and separated by spaces. If there is no negative or positive number is printed “NOT FOUND”
For example:

input:
3
4 -3 -2
output:
4
-3 -2

You are not logged in? Log in to Submit Now!

5 Comments

Add a Comment