| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么错了?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator