C++中,怎样让结果保存两位小数#includeusing namespace std;float main(){ float f,c; coutf; c=5*(f-32)/9; cout

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/17 16:53:09
C++中,怎样让结果保存两位小数#includeusingnamespacestd;floatmain(){floatf,c;coutf;c=5*(f-32)/9;coutC++中,怎样让结果保存两位

C++中,怎样让结果保存两位小数#includeusing namespace std;float main(){ float f,c; coutf; c=5*(f-32)/9; cout
C++中,怎样让结果保存两位小数
#include
using namespace std;
float main()
{
float f,c;
coutf;
c=5*(f-32)/9;
cout

C++中,怎样让结果保存两位小数#includeusing namespace std;float main(){ float f,c; coutf; c=5*(f-32)/9; cout
#include
using namespace std;
float main()
{
float f,c;
coutf;
c=5*(f-32)/9;
cout.precision(3); //输出小数点后两位
cout