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

Re:HELP!!!~

Posted by 90405125 at 2004-12-11 15:12:56 on Problem 1003
In Reply To:HELP!!!~ Posted by:90405125 at 2004-12-11 15:12:41
#include<stdio.h>
#include<math.h>
void main(){
	float l[10000];
	int i,j;
	for(i=0;;i++){
		scanf("%f",&l[i]);
		if(l[i]==0) break;
		for(j=2;;j++){
			if(l[i]-1/(float)j>0){
				l[i]=l[i]-1/(float)j;
			}
		}
		printf("%d card(s)",&j-1);
	}
}


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