February 2022 0 5 Report
Имеется алгоритм задания массива из 10 целых чисел по некоторому правилу. Какое количество четных чисел получилось в массиве, если задать значение переменной n = 13 после выполнения данной программы? program massiv;
var
i, n,s,d: integer;
mas : array [1..10] of integer;
begin
readln(n);
s:= 1; d:= 2;
while n >= d do begin
s:= s + d -3;
d:= d+1;
end;
mas[1] := s;
for i:= 2 to 10 do
mas[i]:= 2*i – mas[i-1];
end.
А) 0 Б) 10 В) 5 Г) 1
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.