#54990: c++ 解答


yp11451009@yphs.tp.edu.tw (711-19王敬皓)


c++

 

#include <bits/stdc++.h>
using namespace std;
int main(){
double t; //必須使用double (浮點數) 若使用int 則無法輸出小數 使用 float 會溢位(NA90%)
cin>>t;
cout<<fixed<<setprecision(3)<<(t-32)*5/9<<endl; //華氏轉攝氏公式
}