Computer Science, asked by manjubarod16, 5 hours ago

Write a program to input the temperature in Fahrenheit and change it to Celsius. Formula: 5 = −32 9 where C = Celsius and F = Fahrenheit ​

Answers

Answered by ItzMeSam35
5

import java.util.Scanner;

public class Temperature {

public static void main (String args []) {

Scanner sc=new Scanner (System.in);

System.out.print("Please enter the temperature in F : ");

double F = sc.nextDouble();

double C = (F-32) * 5/9.0;

System.out.println("Conversion to Celsius : "+C);

sc.close();

}

}

Answered by ry6635440
5

Answer:

important java.util.*;

public class program

{

public static void main (String args[])

{

Scanner scr = new Scanner(System.in) ;

double a,b

System.out.println("Enter the value of Fahrenheit");

a = scr.nextDouble();

b = (a-32)*5/9;

System.out.println(a + " Fahrenheit is equal to" + b + " celsius");

}

}

Similar questions