Robots exercise
For this exercise we must to take a list that contains the power of some robots, each item is a integer that indicates the orientation and the power of a robot, if a the integer is negative the robot will start in the left edge of a square and if it is positive it will start from the right edge of the square, the robots will fight and the robot with the bigger power will win, if they have the same power both of them will be destroyed, the program prints a the list with the remaining robots.
Input:
2 1 3 8 5 -2 -12 -1 -4
Output:
-12 -1 -4