Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:我怎么错啦?请各位兄弟姐妹帮我看看

Posted by zhtsuc at 2006-04-01 13:55:06 on Problem 1005
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator