Skip to content

Instantly share code, notes, and snippets.

@infideleraser
Last active July 26, 2018 03:42
Show Gist options
  • Save infideleraser/7227b7eccce140385e8e4e72bc5a6d25 to your computer and use it in GitHub Desktop.
Save infideleraser/7227b7eccce140385e8e4e72bc5a6d25 to your computer and use it in GitHub Desktop.
wont run outside of eclipse
package Codes;
import java.util.Scanner;
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);
System.out.println("This program made by Infidel Eraser#5265 converts Fahrenheit to Celcius");
System.out.print("Enter temperature in Fahrenheit ");
int fah = f.nextInt();
double calc = ((fah - 32) * 5/9);
System.out.print(fah + "°F = " + calc + "°C");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment