Computer Science, asked by garvitmishra043, 3 months ago

Write a program in Java to convert a temperature in F to that in c. Note: C=(F-32)*5/9


Please write the program for class 8th


And I wud mark u as the brainliest

Answers

Answered by nithishdev509
1

public class temperature  

{  

  public static void main (String args[])  

   { float Fahrenheit, Celsius;  

         Celsius= 13;  

         Fahrenheit =((Celsius*9)/5)+32;  

         System.out.println("Temperature in Fahrenheit is: "+Fahrenheit);  

   }

}

Answered by 11a31JoanneTom
0

Answer:

Explanation:

import java.util.Scanner;

class FahrenheittoCelsius

{

public static void main(String arg[])  

{

    double a,c;

                 Scanner sc=new Scanner(System.in);      

    System.out.println("Enter  Fahrenheit temperature");

                  a=sc.nextDouble();  

    System.out.println("Celsius temperature is = "+celsius(a));              

}  

static double celsius(double f)

{  

return  (f-32)*5/9;

}

Similar questions