last-modified: 2019-04-28 (日) 18:36:58 (1834d)[変更箇所]
いつもやり方忘れるので。
double a=1./3; cout << a <<endl; cout << fixed << setprecision(2) << a <<endl; cout << setw(6) << fixed << setprecision(2) << a <<endl;
0.333333 0.33 0.33
and or
kondowiki memo exp link
#lsx