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

题目1005,为什么会提示编译错误,新来的哦,请指教,谢谢

Posted by huacm273 at 2009-03-10 01:14:29 on Problem 1005
#include<stdio.h>
#include<string.h>
#include<math.h>
#define PI 3.1415926
float radius[200];
void calculateradius()
{	radius[0]=0;
	int i;
	for(i=1;i<200;i++)
	{	radius[i]=sqrt(100/PI+radius[i-1]*radius[i-1]);
	}
}

int main()
{	int i,j,N;
    float x,y;
    calculateradius();
	scanf("%d",&N);
	for(i=1;i<=N;i++)
	{    scanf("%f%f",&x,&y);
	     for(j=0;j<200;j++)
         {    if(radius[j]>=sqrt(x*x+y*y))
              break;
         }
         printf("Property %d: This property will begin eroding in year %d.\n",i,j);
    }
    printf("END OF OUTPUT.");
	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