Hello,
I have a variable named: "number".
My goal is to be left with only the fraction portion of "number".
This is the code I wrote:
But I understand that C++ has a native function for just that - modf()Code:float fraction_number = number - int ( number ) ; // Decrement the integer portion to be left only with the fraction.
Can you please show how to use modf() to achieve the same result ?