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

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/18 16:23:24

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