Write a Java program to convert Celsius to Fahrenheit.

Write a Java program to convert Celsius to Fahrenheit.

Write a Java program to convert Celsius to Fahrenheit.

Program
import java.util.Scanner;
public class Main 
{
	public static void main(String[] args) 
	{
		Double celsius,fahrenheit;
		Scanner s=new Scanner(System.in);
		System.out.println("Enter temperature in Celsius: ");
		celsius=s.nextDouble();
		
		//Conversion formula: Fahrenheit = (Celsius * 9/5) + 32
		fahrenheit=(celsius*9/5)+32;
		System.out.println(celsius+" degrees Celsius is equal to "+fahrenheit+" degrees Fahrenheit");
	}

}


Output:

Enter temperature in Celsius: 28
28.0 degrees Celsius is equal to 82.4 degrees Fahrenheit



More Questions


27 . Write a Java program to convert kilometers to miles.
28 . Write a Java program to convert Celsius to Fahrenheit.
29 . Write a Java Program to Check if a Number is Positive, Negative or Zero.
30 . Write a Java Program to Find the sum of the digits of a number
31 . Write a Java Program to Calculate electricity bill
32 . Write a Java Program to find Armstrong number
33 . Write a java Program to print Armstrong number between 1 to 1000
34 . Write a java Program to Print given number in words
35 . Write a java Program to check the given number is Palindrome or not
36 . Write a java Program to print palindrome number upto N numbers
37 . Write a java Program to print N prime numbers and find sum and average



For latest job updates join Telegram Channel: https://t.me/sateeshm