I Think I Need a Houseboat(圆计算)
http://poj.org/problem?id=1005
View Code
#include<stdio.h> int main() { int n, i ; float x, y ; scanf("%d", &n) ; for(i=1; i<=n; i++) { scanf("%f %f", &x, &y) ; float area = 3.14*(x*x + y*y)/2 ; int year = (int)(area/50) + 1 ; printf("Property %d: This property will begin eroding in year %d.\n", i, year) ; } printf("END OF OUTPUT.\n") ; return 0 ; }