72
Program to convert Fahrenheit into Celsius
Explanation
Fahrenheit and Celsius are the measures of temperature having Unit in degrees as oF
oC respectively. In this tutorial, we have to convert Fahrenheit to Celsius by using the scientific formula in programmes of different languages.
Formula
T(oC) = ((T(oF) - 32 ) × 5)/9
Algorithm
- Define temperature in Fahrenheit unit.
- Apply in the formula.
- Print the temperature in Celsius.
Complexity
O(1)
Solution
Python
Output:
Temperature in Celsius is: 12.22222
C
Output:
Temperature in Celsius is: 17.7777777778
JAVA
Output:
Temperature in celsius is: 6.1111111
C#
Output:
Temperature in celsius is: 1.66666667
PHP
Output:
Temperature in celsius is: 7.7777778
Next Topic#