Temperature from Celsius Scale to Fahrenheit Scale
Problem:
Write a program that asks the user to enter the temperature in degree Celsius and display the temperature in degree Fahrenheit after converting it.Use the following formula for the conversion ((9.0 / 5.0) * Celsius) + 32
Solution Code:
# include <iostream> using namespace std; int main() { double celsius; double fahrenheit; cout<<"Enter the temperature in celsius scale"<<endl;\ cin>>celsius; fahrenheit=(((9.0/5.0)*celsius)+32); cout<<"The temperature in Fahrenheit scale is:"<<fahrenheit<<endl; return 0; }
Write a program that asks the user to enter the temperature in degree Celsius and display the temperature in degree Fahrenheit after converting it.Use the following formula for the conversion ((9.0 / 5.0) * Celsius) + 32
Solution Code:
# include <iostream> using namespace std; int main() { double celsius; double fahrenheit; cout<<"Enter the temperature in celsius scale"<<endl;\ cin>>celsius; fahrenheit=(((9.0/5.0)*celsius)+32); cout<<"The temperature in Fahrenheit scale is:"<<fahrenheit<<endl; return 0; }