Westonci.ca offers quick and accurate answers to your questions. Join our community and get the insights you need today. Our platform connects you with professionals ready to provide precise answers to all your questions in various areas of expertise. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

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