• Bad result

Question related to mission Bulls and Cows

 

Hello, I created brute force algorithm, but it doesn´t work. I think that my code is right.

After some "turns", I have got this result:

2166 0B4C

But right result is 5612... I don´t know, how it´s possible. You can look at the picture.

Thanks for your reply.

13