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

code

Posted by ayxg at 2011-12-07 14:16:41 on Problem 1005
#include <stdio.h>
#include <math.h>
#define PI 3.1415926
#define MY 151
int main()
{
	 int i, j, n; float x, y, r, R[MY]; scanf("%d", &n); j = 1;
	 for (i = 1; i < MY; ++i) R[i] = sqrt((double)i*100/PI);
	 while (j <= n) {
		 scanf("%f%f", &x, &y);
		 r = sqrt(x*x + y*y);
		 for (i = 1; i < MY; ++i) if (r < R[i]) {
			 printf("Property %d: This property will begin eroding in year %d.\n", j++, i); break;
		 }
	 }
	 printf("END OF OUTPUT.\n");
	 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