//Cameron Pham CS1A Chapter 3, P. 144, #10
//
/*******************************************************************************
*
* Convert Celsius to Fahrenheit
* _____________________________________________________________________________
*
* This program converts a temperature from Celsius to Fahrenheit.
*
* Computation is based on the formula:
* F = (9 / 5) * C + 32
* _____________________________________________________________________________
*
* INPUT
* celsius: Temperature in degrees Celsius
*
* OUTPUT
* fahrenheit: Equivalent temperature in degrees Fahrenheit
*
******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
// Declare variables to store the Celsius and Fahrenheit temperatures.
double celsius;
double fahrenheit;
// Ask the user to enter the temperature in Celsius.
cout << "Enter the temperature in Celsius: ";
cin >> celsius;
// Convert Celsius to Fahrenheit using the given formula.
fahrenheit = (9.0 / 5.0) * celsius + 32;
// Display the converted temperature.
cout << "The temperature is " << fahrenheit << " degrees Fahrenheit." <<
endl;
return 0;
}
Ly9DYW1lcm9uIFBoYW0gICAgICAgICAgICAgQ1MxQSAgICAgICAgICAgICAgICAgICAgICAgQ2hhcHRlciAzLCBQLiAxNDQsICMxMAovLwovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiAKICogQ29udmVydCBDZWxzaXVzIHRvIEZhaHJlbmhlaXQKICogX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KICogCiAqIFRoaXMgcHJvZ3JhbSBjb252ZXJ0cyBhIHRlbXBlcmF0dXJlIGZyb20gQ2Vsc2l1cyB0byBGYWhyZW5oZWl0LgogKiAKICogQ29tcHV0YXRpb24gaXMgYmFzZWQgb24gdGhlIGZvcm11bGE6CiAqIEYgPSAoOSAvIDUpICogQyArIDMyCiAqIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiAqIAogKiBJTlBVVAogKgljZWxzaXVzOiBUZ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