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 |
为什么结果一样,却总是WA呢?高手帮忙一下~~#include<iostream> using namespace std; int main(){ const double PI = 3.14159265358979; double x, y; int N; cin >> N; double *year = new double[N]; for(int i = 0; i < N; i++){ cin >> x >>y; year[i] = 0.5 * PI * ( x * x + y * y) / 50; } for(int i = 0; i < N; i++) cout<<"Property "<< i + 1 << ": This property will begin eroding in year "<< int(year[i]) + 1 << "." <<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