#include <iostream>
#include <cmath>
#include <limits>
int main()
{
double myval = 3.1;
double first = 0;
double second = std::modf(myval, &first);
std::cout<<first<<" and "<<second * 10<<"\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxsaW1pdHM+CgppbnQgbWFpbigpCnsKCWRvdWJsZSBteXZhbCA9IDMuMTsKCWRvdWJsZSBmaXJzdCA9IDA7CgkKCWRvdWJsZSBzZWNvbmQgPSBzdGQ6Om1vZGYobXl2YWwsICZmaXJzdCk7CgkKCXN0ZDo6Y291dDw8Zmlyc3Q8PCIgYW5kICI8PHNlY29uZCAqIDEwPDwiXG4iOwoJcmV0dXJuIDA7Cn0=