作业2
2013-03-13 12:20 郭莹莹1114010807 阅读(88) 评论(0) 收藏 举报import java.util.*;
public class Example2{
public static void main (String args[ ]){
Scanner reader=new Scanner(System.in);
int product=1;
int n=0;
while(reader.hasNextInt()){
int x=reader.nextInt();
n=n+1;
product=product*x;
}
System.out.printf("%d个数的积为%f\n",n,product);
}
}
浙公网安备 33010602011771号