Var i:integer; c:array [1..15] of integer; a:array [1..15] of integer;
begin for i:=1 to 15 do begin c[i]:=Random (100); end; for i:=1 to 15 do begin if (c[i] mod 2 = 0) then a[i]:= c[i] div 2 else a [i]:= c [i] *2; end; write ('Массив С: '); for i:=1 to 15 do begin write (c [i]); write (' '); end; writeln (' '); write ('Массив A: '); for i:=1 to 15 do begin write (a[i]); write (' '); end; end.
i:integer;
c:array [1..15] of integer;
a:array [1..15] of integer;
begin
for i:=1 to 15 do begin
c[i]:=Random (100);
end;
for i:=1 to 15 do begin
if (c[i] mod 2 = 0) then
a[i]:= c[i] div 2
else
a [i]:= c [i] *2;
end;
write ('Массив С: ');
for i:=1 to 15 do begin
write (c [i]);
write (' ');
end;
writeln (' ');
write ('Массив A: ');
for i:=1 to 15 do begin
write (a[i]);
write (' ');
end;
end.