将温度从华氏温度转换为摄氏温度 [英] convert the temperature from fahrenheit to celsius

查看:129
本文介绍了将温度从华氏温度转换为摄氏温度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

程序将温度从华氏温度转换为摄氏温度和

反之亦然。还包含一项功能,以便所有数据类型(如整数)的温度转换为
浮动等等?

program to convert the temperature from fahrenheit to celsius and
vice versa.also incorporate a feature so that the temperature conversion is
possible for all data types like integer,float and so on?

推荐答案

试试这个

try this
public double GetFahrenheitForCelsius(double celsius)
{
    return (9 / 5) * celsius + 32;
}



希望这有助于


hope this helps


http://www.dotnetperls.com/convert-degrees [ ^ ]


http://www.lmgtfy.com/?q=c%23+convert+fahrenheit+to+celsius [ ^ ]


这篇关于将温度从华氏温度转换为摄氏温度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆