# Write a java program to convert temperature from fahrenheit to celsius in java to calculate degree

Write a java program to convert temperature from fahrenheit to celsius in java to calculate degree. The Celsius scale is a measurement of temperature. It’s a measurement of how hot or cold something is.°C is a popular abbreviation. Water freezes at 32°F and boils at 212°F under normal conditions, denoting a temperature scale on which water freezes at 32°F and boils at 100°F.

```import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
float Fahrenheit;
double Celsius;
Scanner scan = new Scanner(System.in);
System.out.print("Enter Temperature in Fahrenheit : ");
Fahrenheit = scan.nextFloat();
Celsius = (Fahrenheit-32) / 1.8;
System.out.print("Equivalent Temperature in Celsius = " + Celsius);
}
}```

Output:

Enter Temperature in Fahrenheit : 103 Equivalent Temperature in Celsius = 39.44444444444444

## What is fahrenheit and how to find the fahrenheit temperature

Pertaining to or possessing a temperature scale in which the boiling point of water is 212 degrees above zero and the freezing point is 32 degrees above zero. The Fahrenheit scale is based on the freezing and boiling temperatures of water and is used to measure temperature. Water freezes at 32 degrees Fahrenheit and boils at 212 degrees. This is a measure for assessing how hot or cold something is 11.

This is a thermometer that measures how hot or cold something is. The Fahrenheit scale is generally used in the United States, whereas the Celsius scale is used in most countries that utilize the metric system.

## What is celsius and how to calculate it

The Celsius scale, commonly known as centigrade, is based on the freezing point of water being 0° and the boiling point of water being 100°. Because of the 100-degree difference between the stated points, it is frequently referred to as the centigrade scale. It was invented in 1742 by Swedish astronomer Anders Celsius.

In 1742, Swedish astronomer Anders Celsius (1701–1744) devised a temperature scale that was the inverse of the current “Celsius” scale, with 0 representing the boiling point of water and 100 representing the freezing point. Temperature is sometimes measured in degrees Celsius (°C). 0 degrees Celsius is quite cold! 40 degrees is scorching! Take a look at this thermometer, which displays both Fahrenheit and Celsius temperatures.

## What is floating and double in this program

Float

The word “floating point” is abbreviated as “float.” It’s a built-in data type that’s used to describe numeric values with floating decimal points, according to the specification. Float is a data type that is recognized by C, C++, C#, and many other computer languages. Integer and double are two more popular data types.

Double

A primitive data type in Java is the double keyword. It’s a 64-bit IEEE 754 floating-point with double precision. It’s where variables and methods are declared. It is used to represent decimal numbers in general.