Thursday, 6 February 2014

ICSE Java Programs – Java Program to convert temperature from Celsius to Fahrenheit


/* Java Program to convert temperature from Celsius to Fahrenheit

Formula : 1.8*c+32 */
import java.util.*;

class Temperature

{

public static void main(String args[])

{

double c,f;

Scanner scn=new Scanner(System.in);

System.out.print(” Enter the Temperature is Celsius : “);

c=scn.nextDouble();

f=1.8*c+32;

System.out.println(” The Temperature in Fahrenheit is : ” + f);

}

}


Output 
Enter the Temperature is Celsius : 32
The Temperature in Fahrenheit is : 89.6

ICSE 10th Standard Notes – Arithmetic Operators and their precedence in Java
ICSE 10th Standard Notes – Shift and Bitwise Operator in Java
ICSE 10th Standard Notes – Arithmetic Operators and their precedence in Java
ICSE 10th Standard Notes – Shift and Bitwise Operator in Java



Get Ebooks delivered to your email id

Comments

Subscribe to our channel

Facebook

Powered by Blogger.

Home | Contact Us | DMCA | Terms of Service | Privacy | Advertise

Maven Scientists