How can I round a float value (such as 37.777779) to two decimal places (37.78) in C?
How about this:
float value = 37.777779; float rounded = ((int)(value * 100 + .5) / 100.0);