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 |
为什么编译器上过了,oj一直卡我编译错误呢????????#include<iostream> #include<math.h> using namespace std; float R(float x,float y) { return sqrt(x*x+y*y); }; int year(float r) { int year=0; float area=1.5707963*r*r; for(float i=0;i<area;i+=50.0) { year++; } return year; }; int main() { int N; cin>>N; float x[N],y[N],r; for(int j=0;j<N;j++) { cin>>x[j]>>y[j]; r=R(x[j],y[j]); cout<<"Property "<<j+1<<": This property will begin eroding in year "<<year(r)<<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