Does anyone have any sample code on how to round off a double to a whole number (nearest one)? Say for example rounding 2.12 to 3 and 2.7 to 3?

Any help would be appreciated. I am learning C and...