#includestdio.h int main() { int n; int i,j; double x,y; scanf("%d",n); for(j=1;j=n;j++) { scanf("%lf%lf",x,y); x=3.14*(x*x+y*y); y=x/100.0; printf("Property %d: This property will begin eroding in year %d.\n",j,(int)y+1); } printf("END OF
#include<stdio.h>
int main()
{
int n;
int i,j;
double x,y;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
scanf("%lf%lf",&x,&y);
x=3.14*(x*x+y*y);
y=x/100.0;
printf("Property %d: This property will begin eroding in year %d.\n",j,(int)y+1);
}
printf("END OF OUTPUT.\n");
return 0;
}
poj里的c语言格式比较变态,以后尽量用c++提交;
一不小心导致我错了几次,还好这个改过来了
【文章出处:滨海网站建设公司 http://www.1234xp.com/binhai.html 复制请保留原URL】