Const n = 5;
var x: array[1..n] of integer;
i: integer;
begin
for i := 1 to n do
readln(x[i]);
for i := 1 to n do
if i = 1 then x[1] := 2
else
if (i = n) and (n mod 2 <> 0) then x[n] := n - 1
else
if i mod 2 <> 0 then x[i] := ((i + 1) + (i - 1)) / 2;
for i := 1 to n do
writeln(x[i]);
end.
___________________________________________
var m, n, m1, n1, k: integer;
ch, ost: real;
begin
readln(m, n);
m1 := m;
n1 := n;
k := 0;
if most:=m/n; ch:=0;
end;
if m=n then begin
ch:=1;
ost:=0;
end;
if m>n then begin
while m1 > 0 do begin
if m1 = n then begin
k := k + 1;
break;
end;
m1 := m1 - n;
k := k + 1;
end;
ch := k - 1;
if m1 = n then begin ost := 0;ch := k;end
else
begin
ost := (m1 + n1) / n1; ch := k - 1;end;
end;
writeln(ch, ' ', ost);
end.
______________________________
const n=5;
var a:array[1..n] of real;
i,k:integer;
b,p:real;
begin
k:=1;
for i:=1 to n do
readln(a[i]);
writeln('введите число');
readln(b);
for i:=1 to n do begin
if a[i]p:=a[k];
a[k]:=a[i];
a[i]:=p;
k:=k+1;
end;
end;
for i:=1 to n do
writeln(a[i]);
end.