Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

大哥大姐请帮我改一下这个程序。谢谢!1003题。

Posted by 90301316 at 2003-12-09 21:15:15 on Problem 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator