/in/foo.cc:3:13: error: too many decimal points in number
var a:array[0..30001] of longint;
^~~~~~~~
/in/foo.cc:4:11: error: too many decimal points in number
w:array[1..2] of longint;
^~~~
/in/foo.cc:1:1: error: 'uses' does not name a type
uses math;
^~~~
/in/foo.cc:2:7: error: 'p' does not name a type
const p=0.6180339887498949;
^
/in/foo.cc:3:1: error: 'var' does not name a type
var a:array[0..30001] of longint;
^~~
/in/foo.cc:4:4: error: found ':' in nested-name-specifier, expected '::'
w:array[1..2] of longint;
^
/in/foo.cc:4:3: error: 'w' does not name a type
w:array[1..2] of longint;
^
/in/foo.cc:5:3: error: 'n' does not name a type
n,i:longint;
^
/in/foo.cc:7:1: error: 'procedure' does not name a type
procedure qsort(b,e:longint);
^~~~~~~~~
/in/foo.cc:8:1: error: 'var' does not name a type
var temp,x,i,j:longint;
^~~
/in/foo.cc:9:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:12:5: error: 'temp' does not name a type
temp:=a[x];a[x]:=a[e];a[e]:=temp;
^~~~
/in/foo.cc:12:16: error: 'a' does not name a type
temp:=a[x];a[x]:=a[e];a[e]:=temp;
^
/in/foo.cc:12:27: error: 'a' does not name a type
temp:=a[x];a[x]:=a[e];a[e]:=temp;
^
/in/foo.cc:14:5: error: 'x' does not name a type
x:=a[e];i:=b-1;
^
/in/foo.cc:14:13: error: 'i' does not name a type
x:=a[e];i:=b-1;
^
/in/foo.cc:15:5: error: expected unqualified-id before 'for'
for j:=b to e-1 do
^~~
/in/foo.cc:18:9: error: 'temp' does not name a type
temp:=a[j];a[j]:=a[i];a[i]:=temp;
^~~~
/in/foo.cc:18:20: error: 'a' does not name a type
temp:=a[j];a[j]:=a[i];a[i]:=temp;
^
/in/foo.cc:18:31: error: 'a' does not name a type
temp:=a[j];a[j]:=a[i];a[i]:=temp;
^
/in/foo.cc:19:7: error: 'end' does not name a type
end;
^~~
/in/foo.cc:20:5: error: 'a' does not name a type
a[e]:=a[i+1];a[i+1]:=x;
^
/in/foo.cc:20:18: error: 'a' does not name a type
a[e]:=a[i+1];a[i+1]:=x;
^
/in/foo.cc:22:10: error: expected constructor, destructor, or type conversion before '(' token
qsort(b,i);
^
/in/foo.cc:23:10: error: expected constructor, destructor, or type conversion before '(' token
qsort(i+2,e);
^
/in/foo.cc:24:3: error: 'end' does not name a type
end;
^~~
/in/foo.cc:25:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:27:1: error: 'procedure' does not name a type
procedure bin(i:longint);
^~~~~~~~~
/in/foo.cc:28:1: error: 'var' does not name a type
var lb,ub,mid:longint;k:extended;
^~~
/in/foo.cc:28:24: error: found ':' in nested-name-specifier, expected '::'
var lb,ub,mid:longint;k:extended;
^
/in/foo.cc:28:23: error: 'k' does not name a type
var lb,ub,mid:longint;k:extended;
^
/in/foo.cc:29:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:30:9: error: 'ub' does not name a type
lb:=i;ub:=n+1;
^~
/in/foo.cc:31:3: error: 'k' does not name a type
k:=a[i]/p;
^
/in/foo.cc:32:3: error: expected unqualified-id before 'while'
while (ub-lb)>1 do begin
^~~~~
/in/foo.cc:34:5: error: expected unqualified-id before 'if'
if a[mid]>=k then ub:=mid
^~
/in/foo.cc:36:3: error: 'end' does not name a type
end;
^~~
/in/foo.cc:37:3: error: expected unqualified-id before 'if'
if (ub<n+1) and (abs(a[i]/a[ub]-p)<abs(w[1]/w[2]-p)) then begin
^~
/in/foo.cc:39:5: error: 'w' does not name a type
w[2]:=a[ub];
^
/in/foo.cc:40:3: error: 'end' does not name a type
end;
^~~
/in/foo.cc:41:3: error: expected unqualified-id before 'if'
if (lb>i) and (abs(a[i]/a[lb]-p)<abs(w[1]/w[2]-p)) then begin
^~
/in/foo.cc:43:5: error: 'w' does not name a type
w[2]:=a[lb];
^
/in/foo.cc:44:3: error: 'end' does not name a type
end;
^~~
/in/foo.cc:45:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:47:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:49:7: error: expected constructor, destructor, or type conversion before '(' token
read(n);
^
/in/foo.cc:50:3: error: expected unqualified-id before 'for'
for i:=1 to n do read(a[i]);
^~~
/in/foo.cc:51:8: error: expected constructor, destructor, or type conversion before '(' token
qsort(1,n);
^
/in/foo.cc:52:3: error: 'w' does not name a type
w[1]:=a[1];w[2]:=a[2];
^
/in/foo.cc:52:14: error: 'w' does not name a type
w[1]:=a[1];w[2]:=a[2];
^
/in/foo.cc:53:3: error: expected unqualified-id before 'for'
for i:=1 to n do bin(i);
^~~
/in/foo.cc:54:10: error: expected constructor, destructor, or type conversion before '(' token
writeln(w[1]);
^
/in/foo.cc:55:10: error: expected constructor, destructor, or type conversion before '(' token
writeln(w[2]);
^
/in/foo.cc:56:1: error: 'end' does not name a type
end.
^~~