Help rounding-off numbers (not using printf)
Michel Biedermann
michelbi at oregon.uoregon.edu
Sun May 21 01:45:49 AEST 1989
Is there a C function (user defined or primitive (?)) that will let me
truncate or round-off a number UP TO a certain decimal place. For example
transforming .567 into .6 or -1.502 into -1.5 (i.e. N = round(.567) would
set N to .6. I do not want to simply print a rounded-off number but be
able to use it as well.
Thanks a lot for the help...
Michel Biedermann
U. of Oregon
More information about the Comp.lang.c
mailing list