Hi i need a program that allows me to generate a random number but it needs to be a number with the same consecutive numbers like 222,5555,666,44,11.The program will keep generating until a number with the same consecutive numbers come up and stop. this is what i have so far. thanks for the help.
int entierA8 = rnd.nextInt(10000 - 1) + 1; System.out.println("\n8."); do{ entierA8 = rnd.nextInt(10000 - 1) + 1; System.out.println("Random number genrated: " + entierA8); }while();
Aucun commentaire:
Enregistrer un commentaire