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 |
奇怪呀??Help!!In Reply To:奇怪呀??Help!! Posted by:200530670321 at 2006-04-06 22:01:23 #include<stdio.h> main() { float n=2.0; float real,sum=0.5,t; scanf("%.2f",&real); while(real != 0.00) { while(sum<=real) { n=n+1.0; t=1/n; sum=sum+t; } printf("%.0f card(s)\n",n-1); } return(0); } 每当我输入0.00的时候它最后总是不停地在运行. 奇怪呀? 有人能帮我找一下问题的所在吗?? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator