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:hellozhangmeng at 2009-03-25 20:17:12 > //北大OJ1005,土地腐蚀,每年50平方英里,半圆形 > > #include<stdio.h> > int main() > { > int N,Z,i,j,k; > scanf("%d",&N); > float a[N][2]; // 数组大小给定阿 > > for(i=0;i<N;i++) > { > scanf("%f %f",&a[i][0],&a[i][1]); > } > > for(k=0;k<N;k++) > { > printf("Property %d: This property will begin eroding in year ",k+1); > j=0; > while(j>=0) > { > if(100*j/3.14<a[k][0]*a[k][0]+a[k][1]*a[k][1]&&100*(j+1)/3.14>a[k][0]*a[k][0]+a[k][1]*a[k][1]) > { > Z=j+1; > break; > } > j=j+1; > } > printf("%d.\n",Z); > } > 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