信息技术是没有人能做到的时代 [英] Information Technology is the era to which no one can do eithout

查看:92
本文介绍了信息技术是没有人能做到的时代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何编写伪代码以将celcius转换为华氏

How can i write a Pseudocode to convert from celcius to fahrenheit

推荐答案

伪代码通常在初学者教学时用作预备步骤.因此,这实际上取决于开始教学时达成的共识.我将举一个我自己的发明的简短示例,由于我们不知道您的伪代码应该是什么样子,因此对您的目的来说最有可能是无用的:

Pseudocode is usually used as a preliminary step when teaching beginners programming. So it really depends on what was agreed upon when teaching started. I''ll give a short example of my own invention which will most probably be useless for your purposes since we don''t know what your pseudocode is supposed to look like:

START PROGRAM

INPUT INTO temperature PROMPT "Enter a temperature value in Celsius"
MULTIPLY temperature BY 9 GIVING fahrenheit
DIVIDE fahrenheit by 5 GIVING fahrenheit
ADD 32 TO fahrenheit GIVING fahrenheit

OUTPUT "The temperature in fahrenheit is:" fahrenheit

END PROGRAM



此伪代码不太可能被接受.您可以阅读有关伪代码 [ ^ ].

问候,

Manfred



Not very likely that this pseudocode will be acceptable. You can read some about Pseudocode[^].

Regards,

Manfred


http://en.wikipedia.org/wiki/Pseudocode [ ^ ]


1.使用Google查找摄氏温度到华氏度的公式.

例如,来自: http://wiki.answers.com/Q/What_is_the_conversion_formula_from_Celsius_to_Fahrenheit_and_vice_versa wiki.answers.com/Q/What_is_the_conversion_formula_from_Celsius_to_Fahrenheit_and_vice_versa"target =" _ blank"title ="新窗口> ^ ]

您将获得:

要将摄氏温度转换为华氏温度,请执行以下操作:
F =(C x 9/5)+32
•首先将摄氏温度乘以9.
•将答案除以5.
•现在添加32.

2.现在编写伪代码.

3.这种方法可以用于许多其他问题,并且会让您自力更生,并引起同行的嫉妒.
1. Use google to find the formula for Celcius to Fahrenheit.

e.g from: http://wiki.answers.com/Q/What_is_the_conversion_formula_from_Celsius_to_Fahrenheit_and_vice_versa[^]

You will get:

To convert from Celsius to Fahrenheit:
F = (C x 9/5) +32
•Begin by multiplying the Celsius temperature by 9.
•Divide the answer by 5.
•Now add 32.

2. Now write pseudocode.

3. This approach can be used for many other problems and will make you self reliant and the envy of your peers.


这篇关于信息技术是没有人能做到的时代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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