program raf105;
var
a: array[1..5] of integer;
x,sum_n,sum_c,res,i: integer;
begin
writeln('Вводите 5 чисел по очереди');
for i:=1 to 5 do
readln(x);
if (x mod 2 = 0) and (x <> 0)
then sum_c:= sum_c + x;
if x mod 2 <> 0
then sum_n:= sum_n + x;
end;
writeln('Вывод: ',sum_n-sum_c);
end.
program raf105;
var
a: array[1..5] of integer;
x,sum_n,sum_c,res,i: integer;
begin
writeln('Вводите 5 чисел по очереди');
for i:=1 to 5 do
begin
readln(x);
if (x mod 2 = 0) and (x <> 0)
then sum_c:= sum_c + x;
if x mod 2 <> 0
then sum_n:= sum_n + x;
end;
writeln('Вывод: ',sum_n-sum_c);
end.
PascalABC 3.4.2