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:Re:这个程序挺简单的,为什么过不了呢? Posted by:20091845 at 2010-07-26 16:46:58 #include<stdio.h> #define PI 3.141592635 int main() { int i,n,year; float x[100],y[100],s; scanf("%d",&n); for(i=1;i<=n;i++) { scanf("%f%f",&x[i],&y[i]); } for(i=1;i<=n;i++) { s=0.5*PI*(x[i]*x[i]+y[i]*y[i]); if((int)s%50==0) year=(int)s/50; else year=(int)s/50+1; printf("Property %d: This property will begin eroding in year %d.\n",i,year); } 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