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 |
我是初学者帮个忙为什么一直是waiting!#include<math.h> #include<stdio.h> #define PI 3.1415926 int main() { double x,y,d,r,s=100.0; int n,i,k=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%lf %lf",&x,&y); d=sqrt(x*x+y*y); r=sqrt(s/PI); if(d<=r) k=1; else while(d>=r) { r=sqrt(s/PI); s+=100; k++; } printf("Property %d: This property will begin eroding in year %d.\n",i+1,k); k=0; } 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