78,220 views
44 votes
44 votes
Algorithm to convert Fahrenheit temperature into celsius temperature​

User Xtlc
by
3.0k points

2 Answers

20 votes
20 votes

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

User Norman Ramsey
by
2.8k points
12 votes
12 votes

Lets use python


\\ \tt F=(float(input(


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


\tt print(

Output:-


\tt Enter\:temperature\;in\:Fahrenheit:32


\tt Temperature\:in\:Celsius\:is\:0°C

User Robert Balicki
by
2.8k points