zoj1049-I Think I Need a Houseboart.cpp

来源:互联网 发布:企业网络策划方案 编辑:程序博客网 时间:2024/06/03 19:33
#include<iostream>#include<math.h>using namespace std;int main(){int icase,year,k=1;double x,y,max;cin>>icase;while(icase--){year=1;cin>>x>>y;max=sqrt(x*x+y*y);while(max>sqrt(year*100.0/3.14))year++;cout<<"Property "<<k++<<": This property will begin eroding in year "<<year<<'.'<<endl;}cout<<"END OF OUTPUT."<<endl;return 0;}