2019/c++

IO

fw93 2018. 3. 30. 13:16
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을 프린트, 값이 짤리면 거기까지 반올림 한다.

'2019 > c++' 카테고리의 다른 글

자료구조 요점정리  (0) 2018.04.02
STL Stack  (0) 2018.04.01
File I/O  (0) 2018.03.30
STL Queues  (0) 2018.03.28
SORTING  (0) 2018.03.26