| ||||||||||
| 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 | |||||||||
Re:请伸出你的援助之手....In Reply To:请伸出你的援助之手.... Posted by:snailly18 at 2006-07-24 23:15:04 > #include<stdio.h>
> #include<math.h>
> const double p=acos(-1);
> void main()
> {
> int time,i;
> float x=0,y=0;
> scanf("%d",&time);
> for(i=0;i<time;i++)
> {
> fflush(stdin);
> scanf("%f %f",&x,&y);
> float t=((x*x+y*y)*p)/100.0;
> printf("Property %d: This property will begin eroding in year %d.\n",i+1,int(t)+1);
> }
> printf("END OF OUTPUT.\n");
> }
> 一直wa,我快疯了....
> 指点迷津,大师....谢谢了.....
初看没什么问题。。。呵呵
不过最后一行我没加\n过了 如果不是这个问题就可能是精度 我用的double
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator