1 2 3 4 5 6 7 8 9 10 11 12 | #include <iomanip> using namespace std; int main() { double s = 0.123456789; cout << s << endl; cout << fixed << setprecision(10); cout << s << endl; while(1){} return 0; } | cs |
setting precision, >> 그 자릿수까지 0을 프린트, 값이 짤리면 거기까지 반올림 한다.