| ||||||||||
| 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 | |||||||||
Am I wrong~~?_Whyyyyyyyyyy~?#include<stdio.h>
#define PI 3.14159265358979
int main()
{
int n,i;
double x,y;
double l,pl;
int now=1;
scanf("%d",&n);
for(i=0;i<n;i++)
{
l=100.0/PI;
scanf("%lf%lf",&x,&y);
pl=x*x+y*y;
while (pl>l)
{
l+=100/PI;
now++;
}
printf("Property %d: This property will begin eroding in year %d.\n",i+1,now);
}
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