在下面的代码中,当我输入 = 1 2 3 之类的行时,我想生成这些数字的乘积 = 6.. IT 必须动态生成.. 例如,如果输入任何时间,例如 1 2 3 4 5...
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
StringTokenizer st = new StringTokenizer(line);
list = new LinkedList<Integer>();
while (st.hasMoreTokens()){
int number = Integer.parseInt(st.nextToken());
list.push(number);
for (int i = 0; i < list.size(); i++){
Integer a[] = new Integer[list.size()];
a[i]=list.pop();
}