流程图将华氏温度转换为celcius [英] flowchart convert fahrenheit to celcius

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

问题描述

大家好,我试着在编程中完成我的作业,我需要做一个将华氏温度转换为celcius的流程图。我已经完成了它但是无论何时我输入结果都是错误的。我不明白为什么。我写的是什么..





START



F



转换温度为:; C = 5 // 9 *(f-32)



结束



当它要求我时F结果是错误的。例如:f是3 ..结果应该是-16.1111111但是我的代码没有给我减号。

如果有人帮我,因为我是编程新手,会很高兴。

Hi all, im trying to do my homework in programmning and i need to do a flowchart that converts fahrenheit to celcius.I have already done it but whenever i put the input the result is wrong.i dont get why.here is what i have written..


START

F

"converted temperature is: "; C=5//9*(f-32)

END

when it asks me for F the result is wrong.for ex: f is 3 ..result should be -16.1111111 but my code doesnt give me the minus symbol.
Would be glad if someone helped me as i am new to programming.

推荐答案

那是因为你的公式错了。您应该使用浮点数而不是整数。你也应该用一个正斜杠来划分。无论您在上述公式中输入什么数字,答案都将为零。但是,为了正确地帮助您,您需要编辑您的问题并添加您正在使用的实际代码。
That is because your formula is wrong. You should be using floating point numbers not integers. And you should also use a single forward slash for division. Whatever number you enter in the above formula the answer will be zero. However, in order to help you properly you need to edit your question and add the actual code you are using.


这篇关于流程图将华氏温度转换为celcius的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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