I am trying to create a sort of hangman game, where the program generates a random number and the user guesses digits of it. The program needs to show all zeros replacing all the digits, and then show the entered digits in it's respective place. For example, the number should read 0000000, but if the user correctly guesses 2, it should read something like this: 00020002. How do I do this replacement?
Aucun commentaire:
Enregistrer un commentaire