當前位置:首頁 > 資訊 > 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<stdio.h>
#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號
广东25选5开奖结果