Hello,
I need a function which returns the fraction part of a number.
I mean if the input to the function is 5.678, I need the output to be 0.678.
Is there a built in function to do so in C++?
Thank you
arian
Printable View
Hello,
I need a function which returns the fraction part of a number.
I mean if the input to the function is 5.678, I need the output to be 0.678.
Is there a built in function to do so in C++?
Thank you
arian
You could #include <cmath> and use std::fmod.
Thanks :)