Переведите программу в free pascal var a: array [1..100] of integer; size: integer; even: integer; noteven: integer; begin write('set size a : '); read(size); for i: integer : = 1 to size do begin write('set a[', i, ']: '); read(a[i]); end; for i: integer : = 1 to size do begin if (a[i] mod 2 < > 0) then begin noteven += a[i]; end else begin even += a[i]; end; end; write('sum even numbers = ', even); writeln; write('sum noteven numbers = ', noteven); end.
A: Array [1..100] of integer;
size: integer;
Even: integer;
notEven: integer;
i:integer;
begin
Write('Set size A :');
Read(size);
for i:= 1 to size do begin
Write('Set A[', i, ']: ');
Read(A[i]);
end;
for i:= 1 to size do begin
if (A[i] mod 2 <> 0) then begin
notEven += A[i];
end
else begin
Even += A[i];
end;
end;
Write('Sum even numbers = ', Even);
Writeln;
Write('Sum notEven numbers = ', notEven);
end.