Skip to content

Instantly share code, notes, and snippets.

@infideleraser
Created July 29, 2018 00:30
Show Gist options
  • Save infideleraser/b4e1a01970e7888e9a8616dc9b4f9ff8 to your computer and use it in GitHub Desktop.
Save infideleraser/b4e1a01970e7888e9a8616dc9b4f9ff8 to your computer and use it in GitHub Desktop.
null
import java.util.Scanner;
import javax.swing.JOptionPane;
public class fahrenheitToCelcius {
private static Scanner f;
public static void main (String[] args) //program created by Infidel Eraser#5265 on discord
{
f = new Scanner(System.in);
JOptionPane.showMessageDialog(null, "This program made by Infidel Eraser#5265 \n converts Fahrenheit to Celcius");
JOptionPane.showInputDialog("Enter temperature in Fahrenheit ");
int fah = f.nextInt();
int calc = ((fah - 32) * 5/9);
String str = "";
str = (fah + "°F = " + calc + "°C");
JOptionPane.showMessageDialog(null,str);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment