c++精度输出
2017-02-07 16:37
162 查看
#include <iomanip> cout << fixed << setprecision(1) << i; // 精确到小数点后一位 // cout << fixed 等同 cout << setiosflags(ios::fixed)