// Torrez, Elaine CS1A Chapter 3 P. 144, #10
/******************************************************************************************
*
* CONVERT CELSIUS TO FAHRENHEIT
*
* --------------------------------------------------------------------------------
* This program converts a temperature in Celsius to its equivalent temperature
* in Fahrenheit using the standard conversion formula.
* --------------------------------------------------------------------------------
*
* INPUT
* celsius : Temperature in Celsius
*
* OUTPUT
* fahrenheit : Temperature in Fahrenheit
*
*******************************************************************************************/
#include <iostream>
#include <iomanip> // Included for fixed and setprecision
using namespace std;
int main ()
{
double celsius; // INPUT Temperature in Celsius
double fahrenheit; // OUTPUT Temperature in Fahrenheit
cout << "Enter the temperature in Celsius: ";
cin >> celsius; // Get Celsius value from user
fahrenheit = (9.0 / 5.0) * celsius + 32; // Convert Celsius to Fahrenheit
cout << fixed << setprecision(1); // Format output with one decimal place
cout << "\nTemperature in Fahrenheit: " << fahrenheit << endl;
return 0;
}