rounding a decimal number

rounds a usernumber to a fitting number i.E. 12,45 to 12 or 12,56 to 13. it does this by using float and store it in an int to get lost of the digits after the coma.