Write a program which will take integer numbers as an array. Your program should stop taking input when it sees a negative integer. Then apply these 2 modifications to the array and print the resulting array.

  1. If an element is an even number, divide it by 2.
  2. If an element is an odd number, add the next element to it.

Examples:
INPUT OUTPUT
6 -5 8 10 -1 9 3
1 10 -19 11 5
0 2 4 6 8 10 12 -5 2 -1 0 1 2 3 4 5 6
1 2 3 4 5 6 -10 3 1 7 2 11 3


Important issues about all exams/projects/quizzes: