If you're just looking for cosmetic rounding, the others have provided solutions. But if you're looking for actual rounding, then C99 includes a rounding function in math.h. It rounds a float to the nearest integer. So you'll have to multiply by however many powers of 10 (depending on the precision you want in the end result), do the round, then divide ...