Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

想了半天都不对,最后才发现原来是半圆...贴代码~~

Posted by 1064232633 at 2015-06-13 22:12:33 on Problem 1005
#include <stdio.h>

float pi = 3.14159;
int main()
{
    float x,y;
    int n,i;
    scanf("%d",&n);
    for(i = 1;i<=n;i++){
        scanf("%f %f",&x,&y);
        printf("Property %d: This property will begin eroding in year %d.\n",i,(int)((x*x+y*y)*pi/100 + 1));
    }
    printf("END OF OUTPUT.\n");
    
    return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator