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

我是初学者帮个忙为什么一直是waiting!

Posted by wizardstorm at 2006-01-25 10:25:29 on Problem 1005
#include<math.h>
#include<stdio.h>
#define PI 3.1415926
int main()
{
	double x,y,d,r,s=100.0;
	
	int n,i,k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf",&x,&y);
		d=sqrt(x*x+y*y);
        r=sqrt(s/PI);
		if(d<=r)
			k=1;
		else
		while(d>=r)
		{
			r=sqrt(s/PI);
			s+=100;
			k++;
		}
		
		
		printf("Property %d: This property will begin eroding in year %d.\n",i+1,k);
		k=0;
	}
	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