| ||||||||||
| 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:Re:我怎么错啦?请各位兄弟姐妹帮我看看 Posted by:zhtsuc at 2006-04-01 13:51:15 你题目理解错了
底下是我写的
你看看
#include <stdio.h>
#include<math.h>
int main()
{
int m,i;
int n[10]={0};
float x,y;
double area;
scanf("%d",&m);
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