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)
Temperature in Celsius = ((Fahrenheit-32)*5)/9
Input:
Fahrenheit = 54
Output:
Temperature in Celsius= ((54-32)*5)/9 = 12.22222
Python
Output:
C
Output:
JAVA
Output:
C#
Output:
PHP
Output: