There are various ways to approach this. I'm going to use C as the language (as you did not specify the target language).
- If you're looking for a floating-point number for your result, you can use floor() to remove the decimal digits.
- If you're looking for an integral number for your result, you can simply just cast your floating-point number to an integral number: int three = (int)3.14;
Most languages have similar functionalities.