#include
using namespace std;
void main()
{
double f,c;
coutf;
c=(f-32.0)*5.0/9.0;
cout编写函数float convert(float tempfer),参数和返回值都是float类型,实现c=(f-32)*5/9。在main()函数中实现输入、输出#include
using namespace std; float convert(float tempfer) {float tempcen;tempcen=(tempfer-32.0)*5.0/9.0;return tempcen; } void main() {double f,c;cout<<"请输入华氏温度:";cin>>f;c=convert(f);cout<<“摄氏温度为:”<
推荐
猜你喜欢