标签:ide namespace code turn div std stream out pac
c++输出的精度表示:
头文件:#include <iomanip>
cout<<setionsflags(ios::fixed)<<setprecision(2)<<N<<endl;
1 #include<iostream> 2 #include<cmath> 3 #include <iomanip> 4 using namespace std; 5 6 int main() 7 { 8 double N; 9 while (cin >> N) 10 { 11 cout << setiosflags(ios::fixed) << setprecision(2)<<fabs(N) << endl; 12 } 13 return 0; 14 }
标签:ide namespace code turn div std stream out pac
原文地址:http://www.cnblogs.com/hansichen/p/7134180.html