Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tempconverter;
- import java.util.Scanner;
- public class TempConverter {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.print("Please input the temperature in fahrenheit:");
- int fahrenheit,celcius,precelcius =0;
- fahrenheit=input.nextInt();
- precelcius = (fahrenheit-32);
- celcius = (int) (precelcius*0.555);
- System.out.print("The temperature today in degrees celcius is "+celcius);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement