Javatpoint Logo
Javatpoint Logo

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

  1. Define temperature in Fahrenheit unit.
  2. Apply in the formula.
  3. 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#




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA