I Think I Need a Houseboat

#include<stdio.h>
#include<math.h>
#define p 3.14
int main()
{
    int N,Z,i,t;
	double X[10],Y[10],r,s;
	scanf("%d",&N);
	t=N;
	for(i=0;N>0;N--,i++)
	{
         scanf("%lf %lf",&X[i],&Y[i]);
         
	}
	for(i=0;i<t;i++)
	{
         r=X[i]*X[i]+Y[i]*Y[i];
         s=p*r/2;
		 Z=ceil(s/50);
		 printf("Property %d: This property will begin eroding in year %d.\n",i+1,Z);
	}
	printf("END OF OUTPUT.");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/wanwu_fusu/article/details/80198964
今日推荐