(C++) 소수점 자릿수 조건대로 출력하기


C++에서 소수점 자릿수를 조건대로 출력하는 방법

Published on June 21, 2022 by Lim Kyeong Taek

C++ 소수점 자릿수 cout

0 min READ

  • 소수점 아래 n자리만큼 출력하라


cout « fixed;
cout.precision(n);


ex) 소수점 아래 3자리만큼 출력하라