Q:

Calculate Fahrenheit To Centigrade Using Java

0

This Program is used to calculate Fahrenheit to Centigrade using Java

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// fahrenhit to centigrade 

import java.io.*; 

class ssvfc 
{ 
public static void main(String arg[]) throws IOException 
{ 
String s1; 

double t1,t2; 

DataInputStream dr = new DataInputStream(System.in); 

System.out.println("\nEnter the centigrade in temperature : "); 

s1 = dr.readLine(); 

t1 = Double.parseDouble(s1); 

t2 = (t1 -32)/1.8; 

System.out.println("\nThe temperature in farenhit is : " +t2); 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now