标准C++中如何使用setprecision()???? 日期:2008-12-29 17:44:20 人气:2 标准C++中如何使用setprecision()???? #include #include using namespace std; cout<<setprecision(2)<<fixed<<a; setprecision(2)中的2的意思就是小数点后面有两位数字。