This is different from the storage method of integers, so the format string %d will definitely be different, but the result is related to the compiler. There should be no problem in outputting with the format string %f, which should be 3.234000; If you simply want to change 3.234 to int type 3, you can use forced type conversion, floatnum = 3.12; int convert =(int)num;
The result is convert =3.