第二章作业题2
import java.util.*;
class compute_acc{
public static void main(String args[]){
int acc=1;
Scanner reader=new Scanner(System.in);
while(reader.hasNextInt()){
int x=reader.nextInt();
acc=acc*x;
}
System.out.println("计算结果为:"+acc);
}
}