C++ 浮点数截取精度
C++ 中浮点数截取精度,代码如下:#include <iostream>#include <iomanip>#include <sstream>using namespace std;int main(){ double pi = 3.1415926; cout << setprecision(3) &l