编译失败, 返回值为 1, 编译器输出如下

foo.pas(14,65) Error: Incompatible types: got "Extended" expected "SmallInt"

foo.pas(15,48) Error: Incompatible types: got "Extended" expected "SmallInt"

foo.pas(19,4) Fatal: There were 2 errors compiling module, stopping

Fatal: Compilation aborted

Error: C:\FPC\2.6.0\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)

---|---|---|---|---|---|---|---|-

Unaccepted / 0 / 0ms / 0KB

view sourceprint?

01 const

02 pi=3.1415926;

03 var

04 q,n,t:integer;

05 r,e:real;

06 x,y:array[1..100]of integer;

07 c:array[1..100]of integer;

08 begin

09 readln(n,r);

10 q:=0;

11 t:=0;

12 e:=0;

13 for q:=1 to n do readln(x[q],y[q]);

14 for q:=1 to n-1 do c[q]:=sqrt(sqr(x[q]-x[q+1])+sqr(y[q]-y[q+1]));

15 c[q+1]:=sqrt(sqr(x[1]-x[q+1])+sqr(y[1]-y[q+1]));

16 e:=pi*sqr(r);

17 for q:=1 to n do t:=c[q];

18 writeln(e+t:0:2);

19 end.

0 条评论

目前还没有评论...

信息

ID
1007
难度
5
分类
模拟 点击显示
标签
(无)
递交数
12262
已通过
4337
通过率
35%
被复制
29
上传者