| ||||||||||
| 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 | |||||||||
大家帮忙看看哪里错了,给提个醒,谢谢了。#include<iostream>
#include<cmath>
using namespace std;
int main()
{
const int lose = 100;
const double pi = 3.141;
int n, i;
double x, y, r;
cin>>n;
int *year = new int[n];
for(i=0; i<n ; i++)
{
cin>>x>>y;
r = x*x + y*y;
year[n] = (pi * r) / lose;
}
for(i=1; i<=n ; i++)
{
cout<<"Property "<<i<<": This property will begin eroding int year "<<year[i]+1<<"."<<endl;
}
delete [] year;
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