Temperature Conversion


Submit solution

Points: 2 (partial)
Time limit: 2.0s
Memory limit: 64M

Authors:
Problem type

轉換華氏為攝氏

輸入限制: 數字

Input

溫度(華氏)

Output

攝氏溫度

Sample Input

95

Sample Output

35

Comments


  • 0
    scu12156231  commented on Oct. 12, 2023, 10:55 a.m.

    import java.util.Scanner;

    public class training2 {

    static Scanner s = new Scanner(System.in);
    
    public static void main(String[] args) {
    
        int F = s.nextInt();
        int C = (F - 32)*5/9; 
        System.out.println(C = (F - 32)*5/9);// C = 5/9(F-32)
    
    }

    }


  • 0
    scu12156240  commented on Oct. 12, 2023, 10:55 a.m.

    import java.util.Scanner;

    public class class1012 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner s = new Scanner( System.in);
        double F = s.nextDouble();
        double C = 5.0/9*(F-32);
    
        System.out.println(C);
    
    }

    }


  • 0
    scu12156226  commented on Oct. 12, 2023, 10:54 a.m.

    import java.util.scanner; public static void main(String[] args){ Scanner s=new Scanner(System.in); double F =s.nextDouble(); double C=(F-32) *5/9; System.out.print(C); }


  • 0
    scu12156204  commented on Oct. 12, 2023, 10:54 a.m.

    import java.util.Scanner;

    public class study1010_2 { public static void main(String[] args) { Scanner input = new Scanner(System.in);

        System.out.print("");
        double F = input.nextDouble();
        double C = (F - 32) * 5/9;
    
        System.out.println(C);
    
        input.close();
    }

    }


  • 0
    scu12156223  commented on Oct. 12, 2023, 10:53 a.m.

    package test; import java.util.Scanner; public class temperture {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner x=new Scanner(System.in);
        double F=x.nextDouble();
        double C=(F-32)*5/9;
        System.out.print(C);

  • 0
    scu12156247  commented on Oct. 12, 2023, 10:53 a.m.

    import java.util.*;

    public class h_1 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
    
        Scanner s = new Scanner(System.in);
        double F = s.nextInt();
        double C = (F-32)*5/9;
    
        System.out.println(C);
    
    }

    }


  • 0
    scu12156206  commented on Oct. 12, 2023, 10:48 a.m.

    import java.util.Scanner;

    //2023 課堂練習 public class practice { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("請輸入溫度"); Double F = s.nextDouble(); Double C = (F - 32) * 5 / 9; System.out.println(C);

    }

    }


  • 0
    scu12156208  commented on Oct. 12, 2023, 10:47 a.m.

    import java.util.Scanner;

    public class hw {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner s = new Scanner(System.in);
    
        int F = s.nextInt();
    
        System.out.println("C="+ (F-32)*5/9);
    
    }

    }


  • 0
    scu10156189  commented on Oct. 12, 2023, 10:38 a.m.

    package kk;

    import java.util.Scanner;

    public class lkkk {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
    
        // °C = (°F-32)x5/9
    
        Scanner input = new Scanner(System.in);
    
        int f = input.nextInt();
        System.out.print((f - 32) * 5 / 9);
    
    }

    }


  • 0
    guest_2  commented on Oct. 12, 2023, 10:12 a.m.

    °C = (°F-32)x5/9