POJ_1005_I Think I Need a Houseboat

来源:互联网 发布:巴洛克记忆音乐知乎 编辑:程序博客网 时间:2024/05/17 23:19
#include<stdio.h>#define PI 3.1415926int main(){int n, j;double x, y;scanf("%d", &n);for (int i = 1; i <= n; i++){scanf("%lf%lf", &x, &y);j = (x*x + y*y)*PI / 100;//(x,y)所在半圆面积/每年侵蚀面积j++;printf("Property %d: This property will begin eroding in year %d.\n", i, j);}printf("END OF OUTPUT.\n");return 0;}

0 0
原创粉丝点击