hdu1065

http://acm.hdu.edu.cn/showproblem.php?pid=1065

错了n次了,让所有的水题汗颜啊!

View Code
#include"iostream"
using namespace std;
#define pi 3.1415926//3.1415927(wrong)
int main()
{
int n;
double a,b,sum;
cin
>>n;
int i=0;
while(n--)
{
cin
>>a>>b;
sum
=pi*(a*a+b*b)/2;
int x=(int)(sum/50)+1; //(int)sum/50+1(wrong)
cout<<"Property "<<++i<<":"<<" This property will begin eroding in year ";
cout
<<x<<"."<<endl;
}
cout
<<"END OF OUTPUT."<<endl;
return 0;
}
posted @ 2011-04-02 17:49  聊聊IT那些事  阅读(386)  评论(0编辑  收藏  举报