#include<iostream> #include<iomanip>//才能使用setprecision跟fixed using namespace std; int main(){ double a;//宣告變數(浮點數)用double誤差較小 cin>>a;//輸入 double b=(a-32)/1.8;//換算(網路上就找的到公式) cout<<fixed<<setprecision(3)<<b;//小數點後三位 }