Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
1005 代码额滴神 提交了四次 只是因为最后一个小数点,,,代码如下; # include<iostream> # include<math.h> using namespace std; int main() { int i; int k = 0; float a, b,r,Sz; float s = 50; cin >> i; for (k=0; k < i;++k) { cin>> a >> b; r = sqrt(a*a + b*b); Sz = 1.5707963*r*r; while ( s < Sz) { s = s + 50; } cout <<"Property "<<k+1<<": This property will begin eroding in year "<< s/50<<"."<<endl; } cout << "END OF OUTPUT."<<endl; return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator