| ||||||||||
| 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:slience at 2006-04-01 12:49:21 > #include <stdio.h>
> #include<math.h>
> int main()
> {
> int m,i;
> int n[10]={0};
> float x,y;
> double area;
> do
> scanf("%d",&m);
> while(m<=0);
> for(i=0;i<m;i++)
> {
> scanf("%f%f",&x,&y);
> if(y>=0)
> {
> area=3.14*x*x;
> area=area/100;
> n[i]=(int)area;
> if(area>n[i])
> n[i]=n[i]+1;
> printf("\n");
> }
> }
> for(i=0;i<m;i++)
> if(n[i]!=0)
> printf("Property %d: This property will begin eroding in year %d.\n",i+1,n[i]);
> 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