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 |
Re:我怎么错啦?请各位兄弟姐妹帮我看看In Reply To:Re:我怎么错啦?请各位兄弟姐妹帮我看看 Posted by:zhtsuc at 2006-04-01 13:51:15 你题目理解错了 底下是我写的 #include<iostream> #include<utility> using namespace std; #define pi 3.14 #define up 50 void main() { int N; cin>>N; pair<double,double> a; int i=1; while(cin>>a.first>>a.second) { double sum(0); int count(0); while(sum<(pi*(a.first*a.first+a.second*a.second)/2)) { sum+=up; count++; } cout<<"Property "<<i<<": "<<"This property will begin eroding in year "<<count<<"."<<endl; i++; } cout<<"END OF OUTPUT."<<endl; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator