Java Taskbook Level 3.9
Задание 1
Given a certain line, for example, like this:
javaString str = "023m0df0dfg0";
Print to the console the positions of all zeros in this line.
Задание 2
Given some array, for example, like this:
javaint arr = {1, 2, 3, 4, 5, 6};
Divide the sum of the first half of the elements of this array by the sum of the second half of the elements.
Задание 3
Given an array of strings:
javaString[] arr = {"ab", "cd", "ef"};
Get an array of characters from these strings:
javachars[] {'a', 'b', 'c', 'd', 'e', 'f'};
Задание 4
Two arrays are given:
javaint[] arr1 = {1, 2, 3};
int[] arr2 = {4, 5, 6};
Loop through these arrays and print their elements in each iteration as follows:
java"1,4"
"2,5"
"3,6"
Задание 5
Given some integer:
cppint num = 12;
Convert it to binary.