V. Create a Temprature class. Make two methods: 1. convertFahrenheit - It will take celsius and will print it into Fahrenheit. 2. convertCelsius - It will take Fahrenheit and will convert it into Celsius.

Respuesta :

Following is the class to convert Fahrenheit to celsius

Program to convert Fahrenheit to Celsius:

public class FtoC  

{  

  public static void main (String args[])  

   {

         float F,C;  

         C= 13;  

         F =((C*9)/5)+32;  

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

   }

}  

Program to convert Celsius to Fahrenheit:

public class CtoF

{

public static void main(String args[])

{

float F,C;

F =  C * 9/5  + 32

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

}

}

How to convert celsius to fahrenheit?

Converting a temperature value from the Fahrenheit scale to the Celsius scale is known as the Fahrenheit to Celsius conversion. The formula for the relationship between Fahrenheit and Celsius is °C = (°F - 32) 5/9, where C stands for the value in Celsius and F stands for the value in Fahrenheit.

Hence to conclude  converting celsius to fahrenheit

To know more on temperature conversions follow this link:

https://brainly.com/question/26141817

#SPJ4

ACCESS MORE