其他分享
首页 > 其他分享> > 摄氏温度转华氏温度

摄氏温度转华氏温度

作者:互联网

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");
	}

}

  

标签:Fahrenheit,摄氏温度,Scanner,System,华氏温度,Celsius,input,out
来源: https://www.cnblogs.com/King-boy/p/10498163.html