Back to Examples
package edu.iuk.temperatures;

import java.util.Scanner;
import javax.swing.JOptionPane;

public class Temperatures {

  public static void main(String[] args) {

    //Jacob Morris
    int Fahr;
    double Cels;

    Scanner Fahrenheit= new Scanner (System.in);
    System.out.println(“Please enter the degree in Fahrenheit. (integers only)”);

    //Receive user input of fahrenheit
    Fahr=Fahrenheit.nextInt();

    Cels = (0.55555555) * (Fahr-32);
    JOptionPane.showMessageDialog(null, “the degree in Celsius is ” + Cels + ” degrees”);

  }
}
Back to Examples

Startup Discount
Small Business?
Contact us for an Enormous Discount!