C#程序转换华氏/摄氏/开氏温度 [英] C# program converting Fahrenheit/Celsius/Kelvin

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

问题描述

编写一个Windows应用程序,该程序将温度从华氏温度转换为摄氏度和开氏温度.
这就是我得到的但我做不到凯夫林

Write a Windows application that converts a temperature from Fahrenheit to Centigrade and Kelvin.
This is what i got but i cant do kevlin

19
        private void Fahrenheit_Click(object sender, EventArgs e)
20
        {
21

22
           double dblCelsius;
23
           double dblFahrenheit;
24

25
            dblCelsius = double.Parse(Fahrenheit.Text);
26
            dblFahrenheit = (Celsius * 9 / 5) + 32;
27
            Celsius.Text= Convert.ToString(dblCelsius);
28

29

30
        }


        private void Celsius_Click(object sender, EventArgs e)

        {

            double dblFahrenheit;

            double dblCelsius;


            dblFahrenheit = double.Parse(Celsius.Text);

            dblCelsius = (Fahrenheit - 32) * 5 / 9;

            Fahrenheit.Text = Convert.ToString(dblFahrenheit);


        }


        private void button1_Click(object sender, EventArgs e)

        {

            Application.Exit();

推荐答案

如果找不到此
If you failed to find this http://en.wikipedia.org/wiki/Kelvin_temperature_scale[^] I''m not sure you can finish the task. What else seems to be a problem? Is the ability to solve linear equations of one variable a problem for you? If so, you''re at the wrong forum: CodeProject assume some minimal level of knowledge.

—SA


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

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