#include<iostream>
using namespace std;
int main()
{
int F=0;
int C=0;
cout << "请输入一个摄氏温度" << endl;
cin >> C;
F = C * 9 / 5 + 32;
cout << "华氏温度=" << F << endl;
return 0;
}
输入一摄氏温度,编程输出华氏温度。
于 2022-10-18 20:09:42 首次发布
#include<iostream>
using namespace std;
int main()
{
int F=0;
int C=0;
cout << "请输入一个摄氏温度" << endl;
cin >> C;
F = C * 9 / 5 + 32;
cout << "华氏温度=" << F << endl;
return 0;
}