【C++FAQ】如何设定小数点后的显示位数
double avg = sum / 13; cout.setf(ios::fixed); cout.precision(4); cout << "$" << sum / 12 << endl;
posted on 2011-06-24 15:37 speedmancs 阅读(689) 评论(0) 编辑 收藏 举报
double avg = sum / 13; cout.setf(ios::fixed); cout.precision(4); cout << "$" << sum / 12 << endl;
posted on 2011-06-24 15:37 speedmancs 阅读(689) 评论(0) 编辑 收藏 举报