我需要无知的帮助 [英] I need help clueless

查看:86
本文介绍了我需要无知的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个Windows应用程序,该程序将温度从华氏温度转换为摄氏度和开氏温度.程序应接受华氏温度,然后提供一个将温度转换为摄氏度和开氏度的按钮,并将结果放置在指定格式的指定标签中,以便精确显示小数点后两位.这是用于作业,但我的老师错过了2在线课程,明天上课,我需要一点帮助,但是我不知道从哪里开始,请帮助

Write a Windows application that converts a temperature from Fahrenheit to Centigrade and Kelvin. The program should accept a Fahrenheit temperature and then provide a single Button that will convert this temperature to both Centigrade and Kelvin and place the results in designated Labels formatted so that it shows exactly two decimal places.This is for homework but my teacher has missed 2 online classes and this is due tomorrow,all i need is a little help but i dont know where to begin,please help

decimal F = decimal.Parse(TempUnits.Text);
decimal C = decimal.Parse(Celsius.Text);
decimal K = decimal.Parse(Kelvin.Text);
K = C + 273;
C = (F - 32) * 5 / 9;
F = K - 153;





How do i put it in the label text should i convert it to string?

推荐答案

本文列出了转换公式:

http://www.fordhamprep.org/gcurran/sho/sho/lessons/lesson29.htm [^ ]

那应该可以帮助您入门.如果您有与Winforms相关的特定问题,请为这些问题启动一个单独的线程.
This article lists the conversion formulas:

http://www.fordhamprep.org/gcurran/sho/sho/lessons/lesson29.htm[^]

That should help you get started. If you have specific Winforms related questions, then start a separate thread for those.


请勿使用decimal,请使用double.

使用此方法: http://en.wikipedia.org/wiki/Kelvin [ http ://en.wikipedia.org/wiki/Farenheit [ ^ ].使用方法double.ToString.

即使与第二行明显矛盾,您也会在第一行(摄氏温度的凯尔文)和第三行(摄氏温度的华氏温度)中犯基本错误.

看起来您在完成基本代数的最简单任务时遇到了问题.抱歉,我们无法为没有掌握这些基本主题的人们提供任何帮助.请,请认真考虑:您目前还不能进行任何编程.回到学校!

—SA
Do not use decimal, use double.

Use this: http://en.wikipedia.org/wiki/Kelvin[^], http://en.wikipedia.org/wiki/Farenheit[^]. Use the method double.ToString.

You make elementary mistake in first line (Kelvin from Celsius), and third line (Fahrenheit from Kelvin) even though it is in apparent contradiction of the second line.

It looks like you have problems with most simple task of elementary algebra. Sorry, we cannot provide any help to people who did not master such elementary topics. Please, consider it very seriously: you cannot do any programming — just yet. Back to school!

—SA


这篇关于我需要无知的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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