摄氏温度和华氏温度之间的转换.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace _11_1{public partial class Form1 :Form{public Form1(){InitializeComponent();}private void button1_Click(object sender,EventArgs e){HUAtextBox2.Text = ((9 / 5.0) * Double.Parse(SHEtextBox1.Text) +32).ToString();}private void button2_Click(object sender,Ev

问题描述:

摄氏温度和华氏温度之间的转换.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace _11_1
{
public partial class Form1 :Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender,EventArgs e)
{
HUAtextBox2.Text = ((9 / 5.0) * Double.Parse(SHEtextBox1.Text) +32).ToString();
}
private void button2_Click(object sender,EventArgs e)
{
SHEtextBox1.Text = ((5 / 9.0) * (Double.Parse(HUAtextBox2.Text) - 32)).ToString();
}
}
}

摄氏温度与华氏温度的换算式是:
摄氏温度,冰点时温度为0摄氏度,沸点为100摄氏度
而华氏温度把冰点温度定为32华氏度,沸点为212华氏度
所以1摄氏度等于1.8华氏度
摄氏温度与华氏温度的换算式是:
5(F- 50º)= 9(C-10º)
式中F-华氏温度,C-摄氏温度
华氏度比摄氏度较小.一华氏度等于9/5摄氏度数值+32
将摄氏度转成华氏度,直接乘以9,除以5,再加上32即行.例如,你的体温是37摄氏度.37乘以9等于333.除以5等于 66.6.32加 66.6得 98.6,这就是你体温的华氏度数.