fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4.  
  5. int main(void)
  6. {
  7. int result = 0;
  8. for(;;)
  9. {
  10. float b;
  11. result = scanf(" %f", &b);
  12. if(result == EOF)
  13. break;
  14.  
  15. printf("%g %g %g\n",floor(b), round(b), ceil(b));
  16. }
  17. printf("Done");
  18. return 0;
  19. }
Success #stdin #stdout 0s 2172KB
stdin
3.14
5.86
1.2
stdout
3 3 4
5 6 6
1 1 2
Done