fork download
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
	
	double d_n = 28187281.525;
    double float_part = abs(d_n) - (int)abs((d_n)); //The target number is 28187281.525
    cout << setprecision(5) << float_part; // The result is 0.525
    cout << ((abs(d_n) - (int)abs((d_n))) == 0.525) ; //The result is 0
	return 0;
}
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
0.5250