How to get integral and fractional part of a float?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Help me please

How to get integral and fractional part of a float?

:bust_in_silhouette: Reply From: Inces

int(var) for integer

var - int(var) or fposmod(var,1) for decimal after 0, next multiply result by 10 and int() it for decimal integer.