Write a C++ program that reads temperature in Celsius and display it in Fahrenheit.
In this example, we will find the C++ Program to Convert the temperature from Celsius to Fahrenheit.
Celcius :- Celsius, also called centigrade, scale for measuring temperatures based on 0° for the freezing point of water and 100° for the boiling point of water.
Fahrenheit :- Fahrenheit, scale is based on 32° for the freezing point of water and 212° for the boiling point of water, the interval between the two is divided into 180 equal parts.
Formulae :- F = 1.8*C+32 (where C is the temperature in Celsius)
Hardware and software Required:
Computer System, Windows (OS), Dev C++ (Compiler Program)
C++ Program to Convert the temperature from Celsius to Fahrenheit
// Program temperature conversion from Celsius to fahrenheit. using namespace std; #include<iostream> int main() { float c,f; cout<<"Enter the Celsius Temperature :"<<endl; cin>>c; f = 1.8*c+32; cout<<"Celsius Temperature : "<<c<<endl; cout<<"Farenheit Temperature : "<<f<<endl; return 0; }