//Jacklyn Isordia CSC5 Chapter 4, P. 224, #20
//
/**************************************************************
*
* Finding the freezing and boiling points
* ____________________________________________________________
*
* This program asks the user to enter a temperature and then
* displays all substances that will freeze or boil at that
* temperature.
* ____________________________________________________________
* INPUT
* temperature : Fahrenheit
*
* OUTPUT
* temperature : substances that freeze or boil
*
**************************************************************/
#include <iostream>
using namespace std;
int main() {
const int ETHYL_ALCOHOL_FREEZE = -173;
const int ETHYL_ALCOHOL_BOIL = 172;
const int MERCURY_FREEZE = -38;
const int MERCURY_BOIL = 676;
const int OXYGEN_FREEZE = -362;
const int OXYGEN_BOIL = -306;
const int WATER_FREEZE = 32;
const int WATER_BOIL = 212;
int temperature;
cout << "Enter a temperature in Fahrenheit: ";
cin >> temperature;
if (temperature <= ETHYL_ALCOHOL_FREEZE)
cout << "Ethyl alcohol will freeze." << endl;
if (temperature >= ETHYL_ALCOHOL_BOIL)
cout << "Ethyl alcohol will boil" << endl;
if (temperature <= MERCURY_FREEZE)
cout << "Mercury will freeze." << endl;
if (temperature >= MERCURY_BOIL)
cout << "Mercury will boil" << endl;
if (temperature <= OXYGEN_FREEZE)
cout << "Oxygen will freeze." << endl;
if (temperature >= OXYGEN_BOIL)
cout << "Oxygen will boil" << endl;
if (temperature <= WATER_FREEZE)
cout << "Water will freeze." << endl;
if (temperature >= WATER_BOIL)
cout << "Water will boil" << endl;
return 0;
}