作业题2

import java.util.*;
public class Example{
     public static void main(String args[]){
         Scanner reader=new Scanner(System.in);
         int mul=1;
         while(reader.hasNextInt()){
         int x=reader.nextInt();
         mul=mul*x;
         }
         System.out.printf("%d这些整数的乘积为%f\n",mul);
      }
}
        

posted @ 2013-03-07 21:29  徐慧同学  阅读(114)  评论(0编辑  收藏  举报