我需要我的代码列出随机生成的数字以及将它们一起添加但我无法输出任何内容。欢迎任何建议。谢谢!
Random randomOutput = new Random();
Scanner input = new Scanner(System.in);
switch (game) {
case 3:
for(int gameLoops = 0; gameLoops > game; ++gameLoops){
//System.out.println("gameloops is: " + gameLoops);
int increaseBy = randomOutput.nextInt(9) + 1;
System.out.println("The numbers randomly generated were: " + randomInt );
sum += randomInt;
}
break;
case 4:
for(int gameLoops = 0; gameLoops > game; ++gameLoops){
int increaseBy = randomOutput.nextInt(9) + 1;
System.out.println("The numbers randomly generated were: " + randomInt );
sum += randomInt;
}
break;
case 5:
for(int gameLoops = 0; gameLoops > game; ++gameLoops){
int increaseBy = randomOutput.nextInt(9) + 1;
System.out.println("The numbers randomly generated were: " + randomInt );
sum += randomInt;
}
break;
} // End Switch