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); } }