00001 #include <math.h> 00002 #include <stdio.h> 00003 00004 int main() { 00005 float a = 112.5; 00006 float b = 112.3; 00007 00008 printf("A = %f = %d\n", a, (int) roundf(a)); 00009 printf("B = %f = %d\n", b, (int) roundf(b)); 00010 00011 }