|
|
back to boardSOS!!! В чём ошибка? var c:array [1..101] of integer; i,k,j,kol,d:integer; begin kol:=0; read(k); for i:=1 to k do read(c[i]); for j:= k-1 downto 2 do for i:= 1 to j do if (c[i]>c[i+1]) then begin d:=c[i]; c[i]:=c[i+1]; c[i+1]:=d; end; k:=round(k/2); for i:=1 to k do kol:=kol+round(c[i]/2); write(kol); end. |
|
|