博客
关于我
温度转换
阅读量:395 次
发布时间:2019-03-05

本文共 350 字,大约阅读时间需要 1 分钟。

题目描述

2013夏季,热浪席卷了全球的大部分地方。网上报道美国局部地区的温度达到了100华氏度,而我们宁波的温度也达到40摄氏度以上。那么40摄氏度和100华氏度到底哪个更热一些呢?请你帮忙编一个程序来解决这一问题。输入一个华氏温度,求出其对应的摄氏温度。计算公式如下:

其中c表示摄氏温度,f表示华氏温度。

输入要求

输入一个华氏温度值(浮点数)。

输出要求

输出对应的摄氏温度值,结果要求保留2位小数。

输入样例

100

输出样例

37.78

参考代码:

#include
int main(){ double f,c; scanf("%lf",&f); c=(5*(f-32))/9; printf("%.2lf\n",c); return 0;}

 

转载地址:http://ovszz.baihongyu.com/

你可能感兴趣的文章
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>