In this article you will learn about how
to convert Celsius to Fahrenheit in c++
Formula, F = C * 9/5 + 32
C++ Program to Convert Celsius to
Fahrenheit
#include<iostream>
using namespace std;
int main()
{
float
cen, fah;
cout<<"Enter
temperature in Celsius : ";
cin>>cen;
fah=(cen
* 9/5) + 32;
cout<<"\nTemperature
in Fahrenheit : "<<fah;
return
0;
}
OUTPUT:
Enter temperature in Celsius : 39
Temperature in Fahrenheit : 102.2
0 comments:
Post a Comment