SE701:Guessing Number

From Marks Wiki
Jump to navigation Jump to search

A 4 digit number is chosen. User will be asked to enter 4 numbers, and out put 4 letters as feedback. ‘c’ means correct number in correct position. ‘b’ means correct number but not in correct position. ‘n’ means not exist in any position.

For example: Target number: 1 2 3 4 user enter: 1 5 2 6 output: c n b b

Game ends after a few guessing