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
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
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
Math,
3 months ago
Math,
3 months ago
India Languages,
3 months ago
English,
7 months ago
Computer Science,
7 months ago
Physics,
1 year ago
English,
1 year ago