#23558: C float去除小數點的0


fire5386 (becaidorz)


用%g

例如:

printf("%g\n", odd - even);    //odd 和even的型態要一樣,要嘛兩個都double,要嘛兩個都float