#include <stdio.h>
#include <math.h>
#include <float.h>
int main(void) {
float f = 1.10;
float truncado = (f - trunc(f)) * 10;
printf("Truncado: %f\n", truncado
); float mod = fmodf(truncado, 1.0f);
printf("Mod: %.*f\n", DBL_DIG
-1, mod
); if (mod != 0){
}
else{
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CiNpbmNsdWRlIDxmbG9hdC5oPgogCmludCBtYWluKHZvaWQpIHsKCWZsb2F0IGYgPSAxLjEwOwoJZmxvYXQgdHJ1bmNhZG8gPSAoZiAtIHRydW5jKGYpKSAqIDEwOwoJcHJpbnRmKCJUcnVuY2FkbzogJWZcbiIsIHRydW5jYWRvKTsKCWZsb2F0IG1vZCA9IGZtb2RmKHRydW5jYWRvLCAxLjBmKTsKCXByaW50ZigiTW9kOiAlLipmXG4iLCBEQkxfRElHLTEsIG1vZCk7CglpZiAobW9kICE9IDApewoJCXByaW50ZigiJS4yZiIsIGYpOwoJfQoJZWxzZXsKCQlwcmludGYoIiUuMWYiLCBmKTsKCX0KCXJldHVybiAwOwp9CiA=