how to print a num in c++ with only 2 decimal places code example
Example: how to format decimal palces in c++
std::cout << std::setprecision(2) << std::fixed;
// where the 2 is how many decimal places you want
// note you need to <iomanip>
std::cout << std::setprecision(2) << std::fixed;
// where the 2 is how many decimal places you want
// note you need to <iomanip>