Java Taskbook Level 4.10

Задание 1

Given some array, for example, like this:

javaint[] arr = [1, 2, 3, 4, 5, 6];

Divide the sum of the elements in even positions by the sum of the elements in odd positions.

Задание 2

Given a string:

java"a bc def ghij"

Convert all substrings with less than or equal to three letters to uppercase. In our case, we should get the following:

java"A BC DEF ghij"
Задание 3

There is a certain line with the words:

java"aaa bbb ccc eee fff"

Capitalize the first character of every other word in that line. In our case, it should look like this:

java"aaa Bbb ccc Eee fff"