Click here to Skip to main content
15,906,106 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Write a Windows application that converts a temperature from Fahrenheit to Centigrade and Kelvin.
This is what i got but i cant do kevlin
C#
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();
Posted
Updated 18-Apr-11 15:34pm
v2
Comments
Sander Rossel 18-Apr-11 18:18pm    
Isn't it K = C + 273?
Sergey Alexandrovich Kryukov 18-Apr-11 22:08pm    
I suspect OP is trolling us. I cannot be true...
(Please see my Answer.)
--SA
Sander Rossel 19-Apr-11 2:02am    
I sometimes think that half the people in the Q&A are trolls. The sad fact that most of them are not made me reply to this question once again.
Sergey Alexandrovich Kryukov 19-Apr-11 2:20am    
He he. If they were trolls it would be at least funny. The sad fact is: most of them are not even trolls :-)
--SA
jdsad2008 18-Apr-11 19:40pm    
oh it is?

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900