POJ 1005(向后去整)

内容目录

小数处理……

Program P1005;
const
   pi=3.1415926;
Var
   t,i,j:longint;
   x,y,s:double;
begin
   read(t);
   for i:=1 to t do
   begin
      read(x,y);
      s:=sqrt(x*x+y*y);
      s:=s*s*pi/2;
      s:=s/50;
      if trunc(s)<s then s:=trunc(s)+1
      else s:=trunc(s);
      writeln('Property ',i,': This property will begin eroding in year ',s:0:0,'.');

   end;
   writeln('END OF OUTPUT.');
end.