小数点后保留两位小数(iomanip) June 26, 2024 Content # #include <iostream> #include <iomanip> using namespace std; int main() { float pi = 3.14159265; cout << fixed << setprecision(2) << pi << endl; return 0; } From # Links #