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 |
大哥大姐请帮我改一下这个程序。谢谢!1003题。#include <stdio.h> #include <math.h> void main() { float s=0; float i; float e; int n=1; scanf("%f\n",&e); while (e!=0.00) { for (i=2;;i++) { s=s+1/i; if (s>=e) break; } printf("%.0f card(s)\n",i-1); scanf("%f\n",&e); n++; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator