Z = (1 + 30) : 2 = 15,5 : 2 = 7,75;
I = i + 1 = 0 + 1 = 1.
Z = (7,75 + 30) : 2 = 18,875 : 2 = 9,4375;
I = i + 1 = 1 + 1 = 2.
Z = (9,4375 + 30) : 2 = 19,71875 : 2 = 9,859375;
I = i + 1 = 2 + 1 = 3.
Z = (9,859375 + 30) : 2 = 19,9296875 : 2 = 9,96484375;
I = i + 1 = 3 + 1 = 4.
Z = ( 9,96484375 + 30) : 2 = 19,982421875 : 2 = 9,9912109375;
I = i + 1 = 4 + 1 = 5.
Т. к. i (5) > 4, то цикл окончен.
ответ: Z = 10 (округлил до десятых).
Z = (1 + 30) : 2 = 15,5 : 2 = 7,75;
I = i + 1 = 0 + 1 = 1.
Z = (7,75 + 30) : 2 = 18,875 : 2 = 9,4375;
I = i + 1 = 1 + 1 = 2.
Z = (9,4375 + 30) : 2 = 19,71875 : 2 = 9,859375;
I = i + 1 = 2 + 1 = 3.
Z = (9,859375 + 30) : 2 = 19,9296875 : 2 = 9,96484375;
I = i + 1 = 3 + 1 = 4.
Z = ( 9,96484375 + 30) : 2 = 19,982421875 : 2 = 9,9912109375;
I = i + 1 = 4 + 1 = 5.
Т. к. i (5) > 4, то цикл окончен.
ответ: Z = 10 (округлил до десятых).