Convert Fahrenheit to Celsius Program in Java


Prev Tutorial Next Tutorial

Java Program to Convert Fahrenheit to Celsius

Fahrenheit and Celsius are two unit for measure temperature. We have standard formula to Convert Fahrenheit to Celsius using this formula you can change temperature Fahrenheit to Celsius.


  c = (f - 32) * 5/9;

Convert Celsius to Fahrenheit in Java

import java.util.Scanner;
class Fahrenheit_to_Celsius 
 public static void main(String[] args)
  float cel, far;

Scanner s=new Scanner(;
System.out.println("Enter temp. in Fahrenheit :");

 c = (f - 32) * 5/9;

System.out.println("Temp. in Celsius: "+cel);


Enter temp. in Fahrenheit: 98
Temp. in Celsius: 36.666668

Syntax to compile and run java program


for compile -> c:/>javac Fahrenheit_to_Celsius
for run -> c:/>java Fahrenheit_to_Celsius

Prev Tutorial Next Tutorial


Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements

Buy Websites 9999595223
wifi cctv camera

Wifi CCTV Camera RS:1200 to 2499. Contact no. 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: or 9999595223 Try this Keyword C++ Programs