std::cout.precision(n);
// where n are the numbers you want to display after the decimal. If zero is present before the accuracy limit, but after the decimal number, this will be automatically prevented.
eg. std::cout.precision(5);
then my conid is rated as 5.55000, only 5.55 will be printed
source
share