All pastes #335355 Raw Edit

Untitled

public text v1 · immutable
·published 2007-02-01 08:05 UTC
rendered paste body
import javax.swing.*;
public class Tempconvert {
	
	

    public Tempconvert() {
    }
    
    /**
     * @param args the command line arguments
     *We are going to calculate celsius and Fahrenheit
     */
    public static void main(String[] args) {
    	
               int Celsius;
    	       int  Fahrenheit;
    	
    	
    	String str;
    	
    	str = JOptionPane.showInputDialog("Enter Celsius");
    	Celsius = Integer.parseInt(str);
    	
    	
    	str = JOptionPane.showInputDialog("Enter Fahrenheit");
    	Fahrenheit = Integer.parseInt(str);
    	
    	
    	Fahrenheit = (int)(1.8* Celsius + 32);
    	
    	
    	JOptionPane.showMessageDialog (null, " Fahrenheit: " + Fahrenheit);
    	
       
    }
}