Определите, сколько раз выполняется тело цикла?
1) for k:=3 to 9 do
2) for k:=1 downto 5 do
3) for k:=5 to 10 do
4) for k:=6 downto 2 do
ПОМОГИТЕ ПОЖАЛУЙСТА, УМРУ ЖЕ
это по информатике 10-го класса!
Ответы
Ответ дал:
1
for k := 3 to 9 do - This is a loop that starts with k having the value of 3 and iterates up to 9 (inclusive). It goes from 3, 4, 5, 6, 7, 8, 9.
for k := 1 downto 5 do - This is a loop that starts with k having the value of 1 and iterates down to 5 (inclusive). It goes from 1, 2, 3, 4, 5.
for k := 5 to 10 do - This is a loop that starts with k having the value of 5 and iterates up to 10 (inclusive). It goes from 5, 6, 7, 8, 9, 10.
for k := 6 downto 2 do - This is a loop that starts with k having the value of 6 and iterates down to 2 (inclusive). It goes from 6, 5, 4, 3, 2.
на, не умерааай!!
Вас заинтересует
3 месяца назад
3 месяца назад
3 месяца назад
1 год назад