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<math.h> int main() { int N; scanf("%d",&N); int L=N; while(N--){ double x,y; scanf("%lf %lf",&x,&y); double z=x>y?x:y; int sum=0; double r=0; int i=0; while(r<z){ i++; sum+=50; r=sqrt(sum*2/3.1415926); } printf("Property %d: This property will begin eroding in year %d.",L-N,i); printf("\n"); if(N==0)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