He was asked for the boiling point of water in Fahrenheit.
有人问他华氏温标下水的沸点。
Let's begin with a bit of code to convert temperatures in Fahrenheit to temperatures in Celsius, shown in Listing 1.
让我们首先来看一段代码,其作用是将华氏温度转换为摄氏度,如清单1所示。
The temperature Converter component has a method called convert which accepts the given temperature in Celsius as input and returns the corresponding temperature in Fahrenheit as the output.
Temperature Converter组件具有名为convert的方法,该方法接受以摄氏度表示的给定温度,并将返回对应的华氏度温度作为输出。
- And now temperature in Fahrenheit -- 212 all right, let's go ahead and pick an easy one like 212, Enter, and indeed equals 100 in Celsius.
现在输入华氏温度-,好的,让我们选一个简单的,像,回车,确实等于100摄氏度。
So temperature in Fahrenheit maybe with a space, just to get the aesthetics to look a little interesting.
华氏温度可能用一个间隔来,使其更加美观和有趣。
So if you know a temperature F in Fahrenheit, you can output Celsius.
如果你知道一个华氏温度的温度值,你们输出摄氏温度。
应用推荐