- Instructions are printed.
- The user plays a game of Bulls and Cows.
- The user is given the option to play another game or end the program.
- Steps 2-3 repeat until the user chooses to end the program.
- The computer randomly generates a 4-digit number with no repeating digits.
- The user guesses at the number (similarly entering a 4-digit number with no repeating digits).
- The user is infomred how many bulls (correct digit in the same place as the digit in the secret number) and cows (correct digit in a different place from the digit in the secret number) they have.
- Steps 2-3 are repeated until the user has guessed the secret number.