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:greer at 2005-12-03 23:03:35 你只读了一次就退出了,题目是说一直读,直到读到0.00退出 > 感觉自己在机器上运行没问题啊 > #include <stdio.h> > void main(){ > int number=0,c; > float length,sum=0.00; > scanf("%f",&length); > if(length<=5.20&&length>=0.01) > {for(c=2;length>sum;sum=sum+(1.0/c),c++); > number=c-2; > printf("%d card(s)\n",number); > } > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator