Freedom • 2年前
#include<iostream>
using namespace std;
int main()
{
	int c;
	float f; 
	cin>>c;
	f=9/5*c+32;
	printf("%.2f",f);
	return 0;
}
**这有错吗
评论:
这才是正确答案:
using namespace std; int main(){
int c;
double f;
cin>>c;
f=9.0/5.0*c+32;
cout<<fixed<<setprecision(2)<<f;
return 0;	
}
把9改为9.0就对了
#include<iostream>
using namespace std;
int main()
{
	int c;
	float f; 
	cin>>c;
	f=9.0/5*c+32;
	printf("%.2f",f);
	return 0;
}