printf %f with only 2 numbers after the decimal point?

Use this:

printf ("%.2f", 3.14159);

Leave a Comment