程序編寫一個函數把華氏溫度轉換為攝氏溫度?
#include<iostream>
using namespace std;
void main()
{
double f,c;
cout<<"請輸入華氏溫度:";
cin>>f;
c=(f-32.0)*5.0/9.0;
cout<<“攝氏溫度為:”<<c;
}
程序編寫一個函數把華氏溫度轉換為攝氏溫度?
#include<iostream>
using namespace std;
void main()
{
double f,c;
cout<<"請輸入華氏溫度:";
cin>>f;
c=(f-32.0)*5.0/9.0;
cout<<“攝氏溫度為:”<<c;
}