欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

C#華氏溫度和攝氏溫度相互轉(zhuǎn)換的方法

 更新時(shí)間:2015年07月22日 10:47:24   作者:冰封的心  
這篇文章主要介紹了C#華氏溫度和攝氏溫度相互轉(zhuǎn)換的方法,涉及C#數(shù)學(xué)運(yùn)算的相關(guān)技巧,非常簡單實(shí)用,需要的朋友可以參考下

本文實(shí)例講述了C#華氏溫度和攝氏溫度相互轉(zhuǎn)換的方法。分享給大家供大家參考。具體如下:

public static double CelsiusToFahrenheit (string temperatureCelsius)
{
  double celsius = System.Double.Parse (temperatureCelsius);
  return (celsius * 9 / 5) + 32; 
}
public static double FahrenheitToCelsius (string temperatureFahrenheit)
{
  double fahrenheit = System.Double.Parse (temperatureFahrenheit);
  return (fahrenheit - 32) * 5 / 9;
}

希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論