Need help writing code in C for anAI to win a game like “Bulls and Cows” in theleast amount of turnspossible.————————————————————————————————————————–
Game: Similar to Bulls and Cows, theuser inputs a random 4 digit number (with numbers from 1 to 8 beingallowed and repeating digits allowed).
If the user enters a number in the correct position, 1 bull isgiven but if a correct number is entered but is not in the correctposition, 1 cow is given. The AI should be able to play repeatedlyuntil 4 bulls are reached.
An example of this game could include (with the AIentering the numbers in the most optimal
PayPal Gateway not configured
PayPal Gateway not configured