Var a:array[1..15] of integer; c,e:real;i:integer; begin randomize; for i:=1 to 15 do begin a[i]:=random(9); end; for i:=1 to 15 do begin e:=a[i] div 2; c:=a[i]/2; if a[i]=0 then write(a[i],' ') else begin if e=c then begin c:=a[i]+1; write(c,' '); end else begin c:=a[i]*2; write(c,' '); end; end; end; end.
a:array[1..15] of integer;
c,e:real;i:integer;
begin
randomize;
for i:=1 to 15 do
begin
a[i]:=random(9);
end;
for i:=1 to 15 do
begin
e:=a[i] div 2;
c:=a[i]/2;
if a[i]=0 then write(a[i],' ')
else
begin
if e=c then
begin
c:=a[i]+1;
write(c,' ');
end
else
begin
c:=a[i]*2;
write(c,' ');
end;
end;
end;
end.