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 |
Re:无奈了,怎么都是错的,各位帮忙看一下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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator