1. 程式人生 > >攝氏溫度轉華氏溫度

攝氏溫度轉華氏溫度

rtc ted pac xtend degree imp new print chan

package test;

import java.util.Scanner;

public class ConvertCelsiusToFahrenheit extends ComputeChange {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner input = new Scanner(System.in);
		
		System.out.print("Enter a degree in Celsius:");
		double Celsius = input.nextDouble();
		
		double Fahrenheit =(9.0/5)*Celsius+32;
		
		System.out.println(Celsius + " Celsous is " + Fahrenheit + " Faharenheit");
	}

}

  

攝氏溫度轉華氏溫度