40.3k views
2 votes
Write An Algorithm To converts the temperature of Fahrenheit to celcius​

User Willster
by
4.9k points

1 Answer

3 votes

Answer:

The algorithm for the conversion of temperature from Fahrenheit to Celsius is as follows:

Read the temperature given in degree Fahrenheit.

Convert the temperature in Fahrenheit into Celsius using the formula : C=5/9*(F-32)

Print the Fahrenheit and Celsius value of temperature.

End

Step-by-step explanation:

The algorithm for the conversion of temperature from Fahrenheit to Celsius is as follows:

Read the temperature given in degree Fahrenheit.

Convert the temperature in Fahrenheit into Celsius using the formula : C=5/9*(F-32)

Print the Fahrenheit and Celsius value of temperature.

End

The code for the same is -

void main ( )

{

float a , b ;

cout<<" enter temperature in Fahrenhite : "<<endl;

cin>> b;

a = ( b - 32 ) * ( 5 / 9 ) ;

cout << " Fahrenheit = << b <<"Centigrade = " << a ;

}

User Eomer
by
4.1k points