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

Re:无奈了,怎么都是错的,各位帮忙看一下

Posted by bleedingcrystal at 2006-09-17 15:37:09 on Problem 1005
In Reply To:无奈了,怎么都是错的,各位帮忙看一下 Posted by:zhdk007 at 2006-05-28 19:51:02
> #include<stdio.h>
> #include<math.h>
> const double p=acos(-1);
> int main()
> {
> 	float x,y;
> 	int i,n;
> 	double area;
> 	int year;
> 	scanf("%d",&n);
> 	for(i=0;i<n;i++)
> 	{
> 		scanf("%f%f",&x,&y);
> 		area=sqrt(x*x+y*y);
> 		year=(int)(p*area*area/2)/50;
> 		year=year+1;
> 		printf("Property %d: This property will begin eroding in year %d.\n",i,year);
> 	}
> 	printf("END OF OUTPUT.\n");
> 	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