6 条题解

  • 3
    @ 2025-3-12 21:30:14
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    double c,f;
    cin>>f;
    c=5*(f-32)/9;
    cout<<fixed<<showpoint<<setprecision(5)<<c;
    return 0;
    }
    
    • 2
      @ 2025-3-14 16:10:22

      #include<bits/stdc++.h> using namespace std; int main() { double c,f; cin>>f; c=5*(f-32)/9; cout<<fixed<<showpoint<<setprecision(5)<<c; return 0; }

      • 2
        @ 2025-3-14 16:09:49

        #include<bits/stdc++.h> using namespace std; int main(){ double a; cin>>a; cout<<fixed<<showpoint<<setprecision(12)<<a; return 0; }

        • 1
          @ 2026-3-22 9:24:20

          #include #include // 用于设置输出精度的头文件 using namespace std;

          int main() { // 定义双精度浮点数存储华氏温度 double F; // 读取输入的华氏温度 cin >> F;

          // 按照公式计算摄氏温度
          // 5和9用浮点数形式(5.0/9.0),确保浮点数运算
          double C = 5.0 * (F - 32.0) / 9.0;
          
          // 设置输出格式:固定小数位 + 保留5位小数
          cout << fixed << setprecision(5) << C << endl;
          
          return 0;
          

          }

          • -2
            @ 2025-3-5 21:05:58

            #include #include // 用于控制输出精度

            using namespace std;

            int main() { double F, C; cin >> F; // 读取输入的华氏温度 C = 5 * (F - 32) / 9; // 计算摄氏温度 cout << fixed << setprecision(5) // 固定小数位数并设置精度 << C << endl; // 输出结果 return 0; }

            • -4
              @ 2025-3-5 16:44:52

              #include<bits/stdc++.h>

              using namespace std;

              int main()

              {

              double c,f;
              
              cin>>f;
              
              c=1.0*5*(f-32)/9;
              
              printf("%.5lf",c);
              
              return 0;
              

              }

              • 1

              信息

              ID
              15
              时间
              1000ms
              内存
              256MiB
              难度
              5
              标签
              递交数
              274
              已通过
              95
              上传者