var x,y: array[1..8] of real;
i: integer;
begin
write('x: ');
for i:=1 to 8 do begin
x[i]:=random(20)*1.0;
write(x[i],' ');
end;
writeln;
for i:=1 to 8 do
if i mod 2=0 then y[i]:=4*x[i]
else y[i]:=cos(2*x[i]);
write('y: ');
for i:=1 to 8 do write(y[i],' ');
end.
var x,y: array[1..8] of real;
i: integer;
begin
write('x: ');
for i:=1 to 8 do begin
x[i]:=random(20)*1.0;
write(x[i],' ');
end;
writeln;
for i:=1 to 8 do
if i mod 2=0 then y[i]:=4*x[i]
else y[i]:=cos(2*x[i]);
write('y: ');
for i:=1 to 8 do write(y[i],' ');
end.