how to do this is C++?

Each valid number which is input by the player will be analysed and a hint will be given (except for last attempt). The hint mentions how many digits are placed correctly (denoted by C), how many digits are not in the number at all (denoted by W), and how many digits are in the number but are positioned wrongly (denoted by P). For example, if the computer-generated number is 5314, the following shows some of the inputs and their respective hints.
7890 0C4W0P
1234 1C1W2P
1435 0C0W4P
1354 2C0W2P
3154 1C0W3P
Sounds like your homework. Show us your attempt at it...
Topic archived. No new replies allowed.