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

1005请求大佬指教

Posted by 3215656604 at 2021-01-12 22:39:14
//请求大佬看看哪里有问题?应该是正确的啊。
#include <stdio.h>
#include<math.h>

int main() {
    int N;
    scanf("%d",&N);
    int L=N;
    while(N--){
        double x,y;
        scanf("%lf %lf",&x,&y);
        double z=x>y?x:y;
        int sum=0;
        double r=0;
        int i=0;
        while(r<z){
            i++;
            sum+=50;
            r=sqrt(sum*2/3.1415926);
        }
        printf("Property %d: This property will begin eroding in year %d.",L-N,i);
        printf("\n");
        if(N==0)printf("END OF OUTPUT.");
    }
    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