ZOJ Problem Set - 1049 - info6 - IT610.com 亚博国际平台,亚博体育下载 ,亚博手机版中心
当前位置:首页 > 资讯 > info6 > 正文

ZOJ Problem Set - 1049

发表于: 2015-07-01 ? 作者:chen_swe ? 来源:转载 ? 浏览:
摘要: ZOJProblemSet-1049IThinkINeedaHouseboat#include #definepi3.1415926 intmain(void) { intn; doublex,y; while(scanf_s("%d",&n)!=EOF) { for(inti=0;i

ZOJ Problem Set - 1049

I Think I Need a Houseboat

#include
#define pi 3.1415926
int main(void)
{
    int n;
    double x, y;

    while (scanf_s("%d", &n) != EOF)
    {
        for (int i = 0; i < n; ++i)
        {
            scanf_s("%lf%lf", &x, &y);
            int result = (pi*(x*x + y*y) / 100) + 1;
            printf("Property %d: This property will begin eroding in year %d.\n", i + 1, result);
        }
        puts("END OF OUTPUT.");
    }
    return 0;
}

ZOJ Problem Set - 1049

版权所有 IT知识库 CopyRight ? 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号