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

想复杂了,纯粹水题

Posted by liujunjun at 2012-04-20 22:33:46 on Problem 1005
In Reply To:Re:求教,总是过不了,但是自己感觉是没问题 Posted by:liujunjun at 2012-04-20 22:32:50
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	int n,m=0;
	float x,y,r,sum;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>x>>y;
	    r=sqrt(x*x+y*y);
		sum=3.14*r*r/2;
		while(sum>0)
		{
			sum=sum-50;
			m++;
		}
		cout<<"Property "<<i+1<<": This property will begin eroding in year "<<m<<"."<<endl;
		m=0;

	}
	cout<<"END OF OUTPUT."<<endl;
	return 0;
}

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