fork download
  1. program floorandceiling;
  2. var n,f,c:double;
  3. begin
  4. readln(n);
  5. if n>0 then begin
  6. if n<=100000 then begin
  7. f:=trunc(n);
  8. c:=n+0.5;
  9. c:=trunc(c);
  10. end;
  11. end else if n<0 then begin
  12. if n>=-100000 then begin
  13. f:=n-0.5;
  14. f:=trunc(f);
  15. c:=trunc(n);
  16. end;
  17. end;
  18. writeln(f,' ',c);
  19. end.
Runtime error #stdin #stdout #stderr 0s 328KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Runtime error 106 at $0000000000400209
  $0000000000400209