Fahrenheit
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
problem
Hamish wants to send some of his recipes to a friend in America. He decides to make a quick calculator to convert the temperatures in his recipes from oC to oF, to make it easier for his friend to use.
Hamish要给他的美国朋友寄一些食谱。他打算制作一个便捷计算器,来将食谱中的烹饪温度从摄氏度转换为华氏度,以方便朋友使用。
Temperature (in oF) = (Temperature (in oC) x (9 ÷ 5)) + 32
华氏温度=摄氏温度×(9÷5)+32
Task
Write a program that converts temperatures in oC to temperatures in oF .
任务:
写出一个程序,可以使摄氏温度转换为华氏温度。
Input format:
Integers provided will range from -300 to 300.
输入格式:
从-300 到 300 的整数。
Output format:
Usually positive or negative decimals. It also is required that when the answer has no decimal component, such as 13.0, the output should be in the form of an integer such as 13.
输出格式:
通常是正的或负的小数。
要求:当答案没有小数时,比如如13.0,输出应该是整数形式,如13。
20
68