|
|
back to boardPascal Compilation error. Why? Posted by Michael 20 Aug 2013 19:55 It works on my laptop. I have Pascal ABC. var A:array[1..1000]of string; B:array[1..3]of integer; c,d:integer; begin readln(c); for d:=1 to c do begin readln(A[d]); if A[d]='Emperor Penguin'then B[1]+=1; if A[d]='Little Penguin'then B[2]+=1; if A[d]='Macaroni Penguin'then B[3]+=1; end; d:=max(max(B[1],B[2]),B[3]); if d=B[1]then write('Emperor Penguin'); if d=B[2]then write('Little Penguin'); if d=B[3]then write('Macaroni Penguin'); end. Re: Pascal Compilation error. Why? function max(x,y:integer):integer; begin if x>=y then max:=x else max:=y; end; Re: Pascal Compilation error. Why? Thanks. I didn't know that FreePascal doesn't know this function max(). Edited by author 23.08.2013 10:58 |
|
|