Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
题目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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator