Write a C++ program that gets temperature from the user in Celsius and converts it into Fahrenheit using formula F=9/5*C+32.

 #include<iostream>

using namespace std;

int main()

{

float cel, faren;

cout<<"Enter temperatue in Celcius: ";

cin>>cel;

faren = 9.0 / 5.0 *cel + 32;

cout<<"Temperature in Fahrenh is: ";

cout<<faren;

}

OUTPUT

Enter temperatue in Celcius: 15.50

Temperature in Fahrenh is: 59.9

1 comment: