Temperatures P15613


Statement
 

pdf   zip

html

Write a program that reads an integer number that represents a temperature given in degree Celsius, and that tells if the weather is hot, if it’s cold, or if it’s ok. Suppose that it’s hot if the temperature is higher than 30 degrees, that it’s cold if the temperature is lower than 10 degrees, and that it’s ok otherwise. Moreover, warn if with the given temperature water would boil, or if water would freeze. Assume that water boils at 100 or more degrees, and that water freezes at 0 or less degrees.

Input

Input consists of an integer number.

Output

Print a line telling if it’s hot, if it’s cold, or if it’s ok. Additionally, print another line if water would boild or if water would freeze.

Public test cases
  • Input

    16
    

    Output

    it's ok
    
  • Input

    -5
    

    Output

    it's cold
    water would freeze
    
  • Input

    99
    

    Output

    it's hot
    
  • Input

    100
    

    Output

    it's hot
    water would boil
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Salvador Roura
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    Ada C C++ Haskell Java Lua Perl PHP Python R Rust