Created
July 29, 2018 00:30
-
-
Save infideleraser/b4e1a01970e7888e9a8616dc9b4f9ff8 to your computer and use it in GitHub Desktop.
null
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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