Java Programs

Please click on 1-2 Ads to keep this website's Study Material FREE and regularly Updated.

Program 4: Write a Java program to convert temperature in Celsius to Fahrenheit.

import java.util.Scanner;

public class Convert
	public static void main(String[] args)
		//Declaring Variables
		double Celsius;
		double Fahrenheit;
		Scanner sc=new Scanner(;
		System.out.println("Enter the Temperature in Celsius");

		System.out.println(Celsius+" =  "+Fahrenheit);

If you have any suggestion or found any error in the above program, then do let us know at [email protected] or just comment below.