| ||||||||||
| 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:这样就行了 Posted by:yzhdyw at 2005-09-04 12:53:35 > #include<iostream.h>
> int main(void)
> {
> int n,year;
> float x,y,area;
> cin>>n;
> float *A=new float[n];
> for(int i=1;i<=n;i++)
> {
> cin>>x>>y;
> area=(x*x+y*y)*3.14159/2.0;
> year=1+(int)(area/50.0);
> cout<<"Property "<<i<<": This property will begin eroding in year "<<year<<".\n";
> }
> 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