摘要: cout输出浮点数默认保留六位有效数字。 按照%lf输出,即保留六位小数 cout << fixed << a << endl; View Code 设定保留小数位数 #include<iomanip> cout << setiosflags(ios::fixed) << setprecision( 阅读全文
posted @ 2022-07-23 19:21 80k 阅读(774) 评论(0) 推荐(0)