I'll explain it in more detail :)
Get the input:
First, you'll need the input: a number and a letter. This input is stored in a single string, using getline (see first article).
Translate the input into variables:
Assuming the input is of this format: "35 C", the string need to be seperated in two parts: "35" and "C". This can be done to find the position of the space (see second article), and then use substring (see tird article) to store the two parts in two seperated strings. When this is done, you can use stringstream to convert the 'number-string' into a real number (see first article).
Find condition:
After this is done and the number is stored into a variable of type integer, we need to check in wich state the water is; solid, liquid or gaseous. I prefere celsius, because I'm used to that, so if the temprature is given in F, I need to convert it to integer. This can be done quit easily:
http://en.wikipedia.org/wiki/Temperature_conversion_formulas. After we have the temprature in celcius, we can see in wich range it is (<0, 0-100,>100) and print the condition.