const M: array[1..8] of real = (0.1, 5.6, 0.8, 2.4, 7.3, 6.8, 0.5, 2.3);
var x,y : file of real;
n: real; i: byte;
begin
assign(x,'x.dat');
assign(y,'y.dat');
rewrite(x);
for i:=1 to 8 do write(x, M[i]);
close(x);
reset(x);
rewrite(y);
i := 1;
while not EOF(x) do begin
read(x, n);
if not odd(i) then
write(y, n);
i := i + 1;
end;
close(x);
close(y);
reset(y);
while not EOF(y) do begin
read(y, n);
write(n:5:1);
end;
writeln;
close(y);
end.
//Pascal ABC.NET v3.0 сборка 1111
Const
n=5;
Var
ar:array[1..n] of integer;
i,k:integer;
begin;
randomize;
k:=0;
writeln('Array:');
for i:=1 to n do
begin;
ar[i]:=random(10);
write(ar[i]:4);
if not odd(ar[i]) then inc(k);
end;
writeln;
write('Res=',k);
end.
Var a,b:integer;
begin
readln(a,b);
writeln(a,b);
end.
Ответ:
может 2-3-4-6 (BA-CB-DC-ED)
Объяснение: