| ||||||||||
| 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 | |||||||||
运行跟结果一样啊,为什么老是wrong answer?!#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
struct zuobiao
{
double x;
double y;
}M[10];
int n,Z[10]={0},i=0;
double area=0.0,r=0,R;
scanf("%d",&n);
while(i<n)
{
scanf("%lf %lf",&M[i].x,&M[i].y);
R=sqrt(M[i].x*M[i].x+M[i].y*M[i].y);
area=0.0;
while(r<R)
{
Z[i]+=1;
area=area+100;
r=sqrt(area/3.14);
}
i++;
}
i=0;
while(i<n)
{
printf("Property %d: This property will begin eroding in year %d.\n",i+1,Z[i]);
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