samedi 3 juillet 2021

How can I check to see if a 4-digit number has a duplicate or not?

I am currently coding an Aces Jumble Zilch game. In this game, the computer is supposed to generate a 4-digit number with no duplicates, and the user needs to figure out what that number is. My question is, "How do I check to see if the random number has a duplicate number in it? For example, 4444 would have a duplicate number number but 4321 wouldn't.




Aucun commentaire:

Enregistrer un commentaire