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

Why Compilation error?
Posted by vladi_pavloff 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.
Re: Why Compilation error?
Posted by IlushaMax 27 Mar 2016 00:53
Pascal hasn't function swap. You should to write it yourself