while (in.hasNextInt())因无法结束输入,得不到输出结果

用ctrl+D结束输入