【学C++之初】标准化输出小数点后两位
#include
#include
using namespace std;
int main()
{
int a,f;
float b1,b2;
char c;
cin>>b1>>a>>c>>b2;
cout<<c<<" "<<a<<" "<<setiosflags(ios::fixed) << setprecision(2) <<b1<<" "<<b2 <<endl;
std::cin>
原创
2015-03-31 22:38:46 ·
1001 阅读 ·
0 评论