Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

水题我也坐不出

Posted by o8103421oo at 2009-07-25 16:13:26 on Problem 3299
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator