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 |
高人指点帮我看看哪错了啊,#include<stdio.h> #define PI 3.1415926 void main() { unsigned int N,i,j,a[10]; double x[10],y[10],s=0; scanf("%d",&N); for(i=0;i<N;i++) scanf("%lf%lf",&x[i],&y[i]); for(j=0;j<N;j++) { for(a[j]=0;(x[j]*x[j]+y[j]*y[j])>s;a[j]++) s=(a[j]+1)*100/PI; } for(j=1;j<=N;j++) { printf("Property %d: This property will begin eroding in year %d.\n",j,a[j-1]); } printf("END OF OUTPUT.\n"); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator