c++ (2) 썸네일형 리스트형 c++ cout 출력 소수점 정밀도 setprecision, fixed c에서 소수점 n째 짜리까지 출력하려면 아래와 같이 사용했다 #include int main() { int a, b; scanf_s("%d %d", &a, &b); printf("%.3f", (double)a / b); } c++에서 소수점 n자리까지 출력하려면 아래 예제와 같이 setprecision(n)과 fixed를 사용하면 된다 #include using namespace std; int main() { int a, b; cin >> a >> b; cout c++11 원시 문자열 리터럴 c#에는 문자열에 @를 붙여주면 문자열 내의 이스케이프 문자를 그대로 인식한다 string dir = @"C:\hello\world"; Console.WriteLine(dir); //출력 : C:\hello\world c++에서는 이스케이프가 포함된 문자열을 표현하기 위해서 아래와 같이 R"()"을 사용한다 string dir = R"(C:\hello\world)" std::cout 이전 1 다음