我将setprecision(2)与cout一起使用。有没有一种方法可以接受具有特定浮点精度的变量值?
我能够通过使用上一行中的std::cin.precision(2);来解决它>
std::cin.precision(2);