Write program to round 3.1415 to 3.142 during output
The printf format can do the rounding during outputing float numbers.
#include <stdio.h> int main()// w w w .jav a 2 s . c o m { printf("%1.3f\n",3.1415926535); return(0); }