Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Separation_Number_Fract(double n)
- {
- int count = 0, fractpart_int;
- double val=0, fractpart_double, intpart_double;
- fractpart_double = modf(val, &intpart_double);
- while (n != floor(n))
- {
- n *= 10;
- count++;
- }
- fractpart_double = fractpart_double*pow(10, count);
- fractpart_int = static_cast< int >(fractpart_double);
- return fractpart_int;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement