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 qiuxinbaby at 2012-07-23 21:26:59 on Problem 1005
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define PI 3.141592654

int main()
{
    int N;
    scanf(" %d \n", &N);
    int i;
    int year[N];
    double x[N];
    double y[N];
    double r[N]; 
    for ( i = 1; i <= N ; i ++ )
    {
        scanf("%.1d %.1d", &x[i], &y[i]);
        r[i] =  x[i] * x[i] + y[i] * y[i] ;
        year[i] = floor (PI * r[i] / 100) + 1;
        printf ("Property %d: This property will begin eroding in year %d\n", i, year[i]);
    }
    printf ("END OF OUTPUT.\n");
    system ("pause");
    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