在C++语言中,我想打印像2.0这样的带有小数部分的浮点数,而不使用fixed和setpression。 我怎么能那么做?
2.0
fixed
setpression
printf(“%I.0”,(int)(my_float+0.5f)-(my_float<0));