1116: 零起点学算法23——摄氏温度转换
Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 1982 Accepted: 1305
[Submit][Status][Web Board]
Description
输入华氏温度f,输出对应的摄氏温度c,保留3位小数。
c=5/9*(f-32)
Input
输入f(多组数据)
Output
输出c(每组数据一行)
Sample Input
100
Sample Output
37.778
Source
1 #include<stdio.h> 2 int main(){ 3 float f,c; 4 while(scanf("%f",&f)!=EOF){ 5 c=5.0/9*(f-32); 6 printf("%.3f ",c); 7 } 8 return 0; 9 }