IDNLearn.com connects you with a community of knowledgeable individuals ready to help. Get accurate and detailed answers to your questions from our dedicated community members who are always ready to help.

algorithm to convert Fahrenheit temperature into celsius temperature​

Sagot :

Lets use python

[tex]\\ \tt F=(float(input("Enter\:temperature\:in\:Fahrenheit:")))[/tex]

[tex]\tt C=(F-32)*5/9[/tex]

[tex]\tt print("Temperature\:in\:Celsius\:is",C°C)[/tex]

Output:-

[tex]\tt Enter\:temperature\;in\:Fahrenheit:32[/tex]

[tex]\tt Temperature\:in\:Celsius\:is\:0°C[/tex]

Answer:

Using c++ variable names

double c;

double f;

//set f to some temperature value or pass the value to the function

c=f-32;

c=f*(5/9);

//c is now the temp in celcius