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 20080020 at 2009-05-18 21:40:34 on Problem 1005
In Reply To:虚心的求教,错在哪里了? Posted by:sunshinelims at 2008-01-12 20:09:02
这个题有些诡异,下面是我的程序:但是老是Wrong Answer
#define PAI 3.1415926
#include "stdio.h"
int main()
{ int i,N;
  float a,b;
  double c[20],d;
  scanf("%d",&N);
  for(i=0;i<N;i++)
  {scanf("%lf%lf",&a,&b);
   c[i]=a*a+b*b;
  }
  for(i=1;i<=N;i++)
   {d=c[i-1]*PAI/100+1; 
    printf("Property %d: This property will begin eroding in year %.lf.\n",i,d);
   }
   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