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

C++参考

Posted by freelark at 2016-10-29 17:45:30 on Problem 1005
#include <iostream>
#include <stdlib.h>
using namespace std;

int main(void)
{
	int n = 0;
	double x=0, y=0;
	int years;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >>x>>y;
	    years = int(3.14*(x*x + y*y)/(2*50));
		printf("Property %d: This property will begin eroding in year %d.\n", i + 1, years+1);
	}
	cout << "END OF OUTPUT." << endl;
	system("pause");
	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