fork download
  1.  
  2. var
  3. a:array[1..1000] of longint;
  4. b,c:longint;
  5.  
  6. procedure qs(l,r:longint);
  7. var
  8. i,j,x,temp:longint;
  9. begin
  10. x:=a[(l+r) div 2];
  11. i:=l;
  12. j:=r;
  13. while (i<=j) do begin
  14. while (a[i]<x) do i:=i+1;
  15. while (a[j]>x) do j:=j-1;
  16. if (i<=j) then begin
  17. temp:=a[i];
  18. a[i]:=a[j];
  19. a[j]:=temp;
  20. i:=i+1;
  21. j:=j-1;
  22. end;
  23. end;
  24. if (l<j) then qs(l,j);
  25. if (i<r) then qs(i,r);
  26. end;
  27. begin
  28. Readln(a[c]);
  29. qs (a[c]);
  30. For b := 1 to size do begin
  31. Writeln(a[b]);
  32. End;
  33. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Free Pascal Compiler version 2.2.0 [2009/11/16] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling prog.pas
prog.pas(28,11) Warning: Variable "c" does not seem to be initialized
prog.pas(29,9) Error: Wrong number of parameters specified for call to "qs"
prog.pas(30,20) Error: Identifier not found "size"
prog.pas(33,4) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty