2029: C语言实验——温度转换

Time Limit: 1 Sec  Memory Limit: 64 MB
Submit: 12  Solved: 10
[Submit][Status][Web Board]

Description

输入一个华氏温度,输出摄氏温度,其转换公式为:C=5(F-32)/9。

Input

输入数据只有一个实数,即华氏温度。

Output

输出数据只有一个,即摄氏温度,保留2位有效数字。

Sample Input

32.0

Sample Output

0.00

HINT

 

Source

 1 #include <iostream>
 2 #include <stdio.h>
 3 using namespace std;
 4 
 5 int main()
 6 {
 7     float f;
 8     cin>>f;
 9     f=(5*(f-32))/9;
10     printf("%.2f\n",f);
11     return 0;
12 }

 

 

Freecode : www.cnblogs.com/yym2013

相关文章:

  • 2021-12-01
  • 2022-01-07
  • 2021-09-03
  • 2022-01-01
  • 2021-12-04
  • 2022-01-01
  • 2021-08-15
  • 2021-09-13
猜你喜欢
  • 2021-09-30
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
相关资源
相似解决方案