Computer Science, asked by km3897719, 1 month ago

Write a class that contains the following two methods: i) Public static double CelsiusToFarenheit(double Celsius)- to convert the given Celsius value to its Fahrenheit value. ii) Public static double fahrenheitToCelsius(double Fahrenheit)- to convert given Fahrenheit value to it Celsius value. Use the following formulas for temperature conversion: Fahrenhiet =(9.0/5)*(celsius + 32) Celsius =(5.0/9)*(Fahrenheit-32) Finally invoke these methods from main() method to convert some test values​

Answers

Answered by kavitasinghprisa
4

Explanation:

JAVA

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 bhuwansbg08
1

I did not get the perfect program but u can refer to it

Attachments:
Similar questions