Question: Please design a C program that guesses a four-digit game for a few A and a few B Claim: Enter the answer first, then guess

Please design a C program that guesses a four-digit game for a few A and a few B Claim: Enter the answer first, then guess again, always guess 4A0B, then output bingo Note: Game tips If the correct answer is 5234, and the guesser guesses 5346, it is 1A2B, which has a position of 5, which is recorded as 1A, and the two numbers 3 and 4 are correct, and the position is not correct, so it is recorded as 2B. Together, it is 1A2B. Number cannot be repeated.

EXAMPLE:

Ex1.

5234

5346

5234

Ex2.

5143

5216

9513

5143

OUTPUT EXAMPLE

Ex1.

1A2B

4A0B bingo!!!

Ex2.

1A1B

1A2B

4A0B bingo!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!