| ||||||||||
| 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 | |||||||||
我用java编的 类名我该定义成什么啊import java.util.*;
public class Main{
public static void main(String argc[]){
float a =0 ;
float b =0 ;
Scanner cin = new Scanner(System.in);
a = cin.nextFloat();
int c = 0;
for(float i = 1; b < a; i++){
b = b + 1/(i+1);
c = (int)i;
}
System.out.println(c+" card(s)");
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator