【程式語言】JAVA的第三堂課 |攝氏溫度 轉 華氏溫度 (Celsius to Fahrenheit)
Published:
by .import java.util.*;
public class hw2 {
public static void main(String[] args) {
System.out.print("Please input Celsius:");
Scanner input = new Scanner(System.in);
double temp = input.nextDouble();
System.out.println("Fahrenheit is " + ((temp * 1.8) + 32) + "F");
}
}