C++浮点型保留有效数字与小数位数 #include <iostream> #include <iomanip> using namespace std; int main() { float a=1.232423; cout<<setprecision(2