Decode School

Decode School - The School for Problem Solvers
Need Assignment / Project Guidance (or) Training in Python?

Java Program to calculate Celsius to Fahrenheit

Sample Input 1:

Enter the Celsius:1

Sample Output 1:

The Fahrenheit Is:33.8

Program or Solution

import java.util.*;
class CeToFa
   public static void main(String args[])
       double fahreheit,celsius;
       Scanner sc=new Scanner(;
       System.out.println("Enter The Celsius:");
       System.out.println("The Fahreheit Is:"+fahreheit);

Program Explanation

Get celsius as input (using scanner class) Calculate fahreheit using Formula fahreheit=celsius*1.8+32; print fahreheit (using system.out.println).