home *** CD-ROM | disk | FTP | other *** search
- main() /* floor.c -- demonstrates use of floor() */
- {
- prfloor(0.58);
- prfloor(1.99);
- prfloor(-0.58);
- prfloor(-1.99);
- puts("\nCorrect output is: 0.000000 1.000000 -1.000000 -2.000000");
- }
-
- prfloor(d)
- double d;
- {
- printf("%g ",floor(d));
- }