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
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
1
I did not get the perfect program but u can refer to it
Attachments:


Similar questions