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:sunlight13 at 2007-01-26 16:27:53 > #include<stdio.h> > > main() > { > int i=0,j=0,flag=1,card=1; > float len[100],needlen=0; > > while(flag==1) { > scanf("%f",&len[i]); > if(len[i]==0.00) > flag=0; > i++; > } > for(j=0;j<=i-2;j++) { > while(len[j]>=needlen) { > needlen=needlen+(float)1/(card+1); > card++; > } > printf("%d card(s)",card-1); > } > system("pause"); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator