| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
水题我也坐不出#include "stdio.h"
#include "math.h"
int main(void)
{
double t,d,humidex,e,h;
char T,D,H='H';
while(scanf("%c",&T),T!='E')
{
scanf("%lf",&t);
scanf(" %c",&D);
scanf("%lf",&d);
getchar();
e = 6.11 * exp (5417.7530 * (((double)1/273.16) - ((double)1/(d+273.16))));
h = (0.5555)* (e - 10.0);
humidex = t + h;
t=(int)(t*10+0.5);
t=(double)t/10;
d=(int)(d*10+0.50);
d=(double)d/10;
humidex=(int)(humidex*10+0.5);
humidex=(double)humidex/10;
printf("%c %.1lf %c %.1lf %c %.1lf\n",T,t,D,d,H,humidex);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator