write a Java program which convert a given temperature from Fahrenheit to Celsius (hint:C=58×[F-32]and F=1.8×(C+32)
Answers
Answer:
class FahrenheittoCelsius
{
double celsius(double f)
{
return (f-32)*5/9;
}
public static void main(String arg[])
{
double a,c;
Scanner sc=new Scanner(System.in);
System.out.println("Enter Fahrenheit temperature");
a=sc.nextDouble();
FahrenheittoCelsius fah=new FahrenheittoCelsius( );
double result=fah.celsius(a);
System.out.println("Celsius temperature is = "+result);
}
}
Answer:
Carbon is a chemical element with the symbol C and atomic number 6. It is nonmetallic and tetravalent—making four electrons available to form covalent chemical bonds. It belongs to group 14 of the periodic table. Carbon makes up only about 0.025 percent of Earth's crust.