题目链接:http://bailian.openjudge.cn/practice/1005
# include <stdio.h>
# include <math.h>
const double PI=3.1415927; // const限定一个变量不允许被改变
int main()
{
int n,i=1;
int year;
double x,y;
double radius,area; //radius半径范围,area面积
scanf("%d",&n);
while(n--)
{
scanf("%lf%lf",&x,&y);
radius = x * x + y * y;
area = PI * radius / 2.0;
year = (int)ceil(area /50.0); // (int),把浮点型转换成整型,ceil函数上取整
printf("Property %d: ",i++); // property拥有权
printf("This property will begin eroding in year %d.\n",year);
}
printf("END OF OUTPUT.\n");
return 0;
}