F>32有什么意义?而且还没有初始化,代码参考如下:
#include <iostream>
using namespace std;
int main()
{
int F,C;
cin>>F;
if(F > 32)
{
cout << "F大于32" << endl;
//添加需要的处理
}
else if(F < 32)
{
cout << "F小于32"<<endl;
//添加需要的处理
}
else
{
cout << "F等于32"<<endl;
//添加需要的处理
}
C = 5*(F-32)/9;
cout << "Celsius="<< C <<endl;
return 0;
}
F>32 不对, 应该是 cin>>F; if(F>32) {…………}
具体题目是?