Program to convert Celsius to Fahrenheit

Write a program that convert inches to centimeters. For, example, if the input is 34 degree celsius, it should return 93.2 fahrenheit.

The formula is $$F = \frac{9}{5}C +32 $$

The program is

using namespace std;
int main(){
	float f,c;
	cout<<"Enter the temperature in Celsius : ";
	f = (9*c/5)+32;
	cout<<"The temperature in Fahrenheit is : "<<f;
	return 0;
enter the temperature
enter the temperature
The value of the temperature

Now, write a program that converts Fahrenheit to Celsius.

Leave a Reply