I am completely new to Java and working on an assignment. I need to generate 6 random numbers within the range of 1 - 49, which is simple. However, the complication is that the numbers cannot duplicate. The only options I have for conditionals are the while loop, or the if else statements. Arrays and all other loops are off limits for this assignment. Could really use some advice regarding logistics of how to apply the options I have. I realize without arrays, and the other loops that I'm going to have a lot of duplicate code but can handle that. I just need some help wrapping my head around this.
Aucun commentaire:
Enregistrer un commentaire