ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1025. Democracy in Danger

vladi_pavloff Why Compilation error? [1] // Problem 1025. Democracy in Danger 6 Nov 2012 19:41
var
  t: real;
  n, k, i,j: integer;
  a:array [1..101] of integer;

begin
  readln(n);
  for i := 1 to n do
  begin
    read(a[i]);
  end;
  for i:=1 to n do
  begin
    for j:=1 to n do
    begin
    if a[i]<a[j] then
    begin
      swap(a[i],a[j]);
    end;
    end;
  end;

  for i:=1 to (n div 2)+1 do
  begin
    t:=t+((a[i] div 2)+1);
  end;

  write(t);
end.
IlushaMax Re: Why Compilation error? // Problem 1025. Democracy in Danger 27 Mar 2016 00:53
Pascal hasn't function swap. You should to write it yourself