Tuesday, 20 December 2016

Java Program to Convert Temperature in Fahrenheit to Celsius

Problem:- Java program to convert Fahrenheit to Celsius or Java Program to Convert Fahrenheit into Celsius or How to Convert Fahrenheit to Celsius in Java with Example or Java Program to Convert Centigrade to Fahrenheit or java program to convert Fahrenheit to Celsius or java program to convert Celsius to Fahrenheit and vice versa. Java Program For Converting Temperature Celsius Into Fahrenheit .means you have to give the temperature in Celsius you need to change the temperature in Fahrenheit.


Logic:- For converting temperature Celsius to Fahrenheit there is a no magic there is a formula you have to just put Celsius temperature and program automatically calculate and print temperature in Fahrenheit with the help of given formula.


Formula 


Fahrenheit = 32 + (Celsius * 9 / 5) //or you can use 1.8 in place of 9/5



See Also:- C++ Program For Converting Temperature Celsius Into Fahrenheit

Java Program to Convert Temperature in Fahrenheit to Celsius



import java.util.*;
/*
Visit http://www.programmingwithbasics.com/
*/
class CtoF
{
 public static void main(String[] args)
 {
  float cel,feh;
  Scanner scan = new Scanner(System.in); 
  System.out.println("Enter The Temperature in Celsius");
 
  cel = scan.nextFloat();
  feh = 32 + (cel * 9 / 5);

  System.out.println("Temperature in Fahrenheit = " + feh);
 }
}

See Also:- C Program For Converting Temperature Celsius Into Fahrenheit


Output:-

Extreme Recommended:- Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date. If you have any Query or Question you can ask in the group, I will Try To Solve your Query and try to answers of your Questions withing 24 Hours, You can also Email me or comment below Please suggest to your Friends to join and like our page and don't forget to Subscribe. Enter your Email and click to subscribe.

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment