3 solutions

  • 1
    @ 2026-2-23 11:29:59
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        double k;
        cin>>k;
        double c=k-273.15;
        double f=c*1.8+32;
        if(f>212){
            cout<<"Temperature is too high!";
            return 0;
        }
        printf("%.2f %.2f",c,f);
        return 0;
    }
    
    
    • 0
      @ 2026-1-25 19:50:23
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          double k;
          cin>>k;
          if((k-273.15)*1.8+32>212.0)cout<<"Temperature is too high!";
          else printf("%.2f %.2f",k-273.15,(k-273.15)*1.8+32.0);
      }
      
      • -2
        @ 2025-11-27 11:54:18

        C++ :

        #include<bits/stdc++.h>
        using namespace std;
        int main(){
            double k;
            cin>>k;
            double c=k-273.15;
            double f=c*1.8+32;
            if(f>212){
                cout<<"Temperature is too high!";
                return 0;
            }
            printf("%.2f %.2f",c,f);
            return 0;
        }
        
        • 1

        Information

        ID
        8
        Time
        1000ms
        Memory
        128MiB
        Difficulty
        6
        Tags
        # Submissions
        21
        Accepted
        10
        Uploaded By