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 safulas at 2009-02-16 15:28:26 on Problem 1005
#include<stdio.h>
#define PI 3.1415926
void main()
{
	unsigned int N,i,j,a[10];
	double x[10],y[10],s=0;
	scanf("%d",&N);
	for(i=0;i<N;i++)
		scanf("%lf%lf",&x[i],&y[i]);
	for(j=0;j<N;j++)
		{
			for(a[j]=0;(x[j]*x[j]+y[j]*y[j])>s;a[j]++)
				s=(a[j]+1)*100/PI;	
		}
	for(j=1;j<=N;j++)
		{
			printf("Property %d: This property will begin eroding in year %d.\n",j,a[j-1]);
		}
	printf("END OF OUTPUT.\n");
}

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