Write a program that gets temperature from the user in Fahrenheit and converts it into Celsius using the formula C=5/9*(F-32).

package input.output.programm;

import java.util.Scanner;

class InputOutputProgramm {

public static void main(String[] args) {

Scanner n=new Scanner(System.in);

float cel,fahr;

System.out.println(“Enter the temperature in Fahrenheit “);

fahr= n.nextFloat();


System.out.println(“Temperature in Fahrenheit is =”+fahr);




Enter temperature in Fahrenheit


Temperature is=56.0


Leave a Reply

Your email address will not be published. Required fields are marked *