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 |
小菜鸟的AC纪念。。。如有不足恳请指正#include<stdio.h> int main() { int n,i,j,b[20]; double a[20][2],r2,pi=3.1415; scanf("%d",&n); for(i=0;i<n;i++) scanf("%lf%lf",&a[i][0],&a[i][1]); for(i=0;i<n;i++) { r2=a[i][0]*a[i][0]+a[i][1]*a[i][1]; for(j=0;;j++) if(j*50*2>pi*r2) { b[i]=j;break; } printf("Property %d: This property will begin eroding in year %d.\n",i+1,j); } printf("END OF OUTPUT."); return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator