Q3 10 nts Arrays Write a program that converts Fahrenheit te
Solution
// Fahrenheit to Celsius conversion in Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class FahrenheitToCelsius
{
public static void main(String[] args) throws IOException
{
BufferedReader reader
= new BufferedReader(new InputStreamReader(System.in));
System.out.print(\"Please enter temperature in Fahrenheit : \");
double fahrenheit = Double.parseDouble(reader.readLine());
double celsius = (5.0/9.0)*(fahrenheit - 32);
System.out.println(\"Temperature in Celsius is : \"+celsius);
}
}
*****************************************************************************************
// Celsius to Fahrenheit conversion in Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class CelsiusToFahrenheit
{
public static void main(String[] args) throws IOException
{ BufferedReader reader
= new BufferedReader(new InputStreamReader(System.in));
System.out.print(\"Please enter temperature in Celsius : \");
double celsius = Double.parseDouble(reader.readLine());
double fahrenheit = (9.0/5.0)*celsius + 32;
System.out.println(\"Temperature in Fahrenheit is :
\"+fahrenheit);
}
}
| // Fahrenheit to Celsius conversion in Java |
![Q3 [10 nts] (Arrays) Write a program that converts Fahrenheit temperatures to Celsius and Kelvin. Read an integer n from the keyboard and then create an array Q3 [10 nts] (Arrays) Write a program that converts Fahrenheit temperatures to Celsius and Kelvin. Read an integer n from the keyboard and then create an array](/WebImages/39/q3-10-nts-arrays-write-a-program-that-converts-fahrenheit-te-1118531-1761594686-0.webp)
![Q3 [10 nts] (Arrays) Write a program that converts Fahrenheit temperatures to Celsius and Kelvin. Read an integer n from the keyboard and then create an array Q3 [10 nts] (Arrays) Write a program that converts Fahrenheit temperatures to Celsius and Kelvin. Read an integer n from the keyboard and then create an array](/WebImages/39/q3-10-nts-arrays-write-a-program-that-converts-fahrenheit-te-1118531-1761594686-1.webp)