zoj 1049//老死在houseboat。。。

来源:互联网 发布:excel怎样复制一列数据 编辑:程序博客网 时间:2024/05/09 05:56
#include"stdio.h"
#define pi 3.14159

int main()
{
    long n, i, t;
    float x, y;

    scanf("%d",&n);
    for (i=1;i<=n; i++)
    {
       scanf("%f%f", &x,&y);
       for (t=1; t < pi * (x * x + y *y) / 100; t++);  //semicircle,半圆 
       printf("Property %d: This property will begineroding in year %d.\n", i, t);
    }
    printf("END OFOUTPUT.");

    return 0;
}

原创粉丝点击