//Sam Partovi CS1A Chapter 3, P. 144, #10
//
/*******************************************************************************
*
* CONVERT CELSIUS TO FAHRENHEIT
* ____________________________________________________________
* This program converts temperatures in Celsius to Fahrenheit based on a user's
* provided value.
*
* The conversion is derived from the following formula:
* degreesFahrenheit = (1.80 * degreesCelsius) + 32
* ____________________________________________________________
*INPUT
* degreesCelsius : Degrees in celsius to be converted to Fahrenheit
*
*OUTPUT
* degreesFahrenheit : Degrees in Fahrenheit converted from Celsius
*
******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
//Initialize program variables
double degreesCelsius;
double degreesFahrenheit;
//Prompt user for degreesCelsius input
cout << "This program converts degrees Celsius to degrees Fahrenheit."
<< endl;
cout << "---------------------------------------------------" << endl;
cout << "Enter the temperature in Celsius to be converted: " << endl;
//User inputs degreesCelsius
cin >> degreesCelsius;
//Perform temperature conversion
degreesFahrenheit = (1.80 * degreesCelsius) + 32;
//Display the result
cout << degreesCelsius << " degrees Celsius is " << setprecision(5)
<< degreesFahrenheit << " degrees Fahrenheit." << endl;
return 0;
}