转自:https://blog.csdn.net/zfjBIT/article/details/93972484
#include <iomanip>
std::cout << std::setiosflags(std::ios::fixed) << std::setiosflags(std::ios::right) << std::setprecision(3);
效果
标签:std,输出,cout,93972484,小数点,位数 From: https://www.cnblogs.com/5free/p/16845093.html