Question: how do we compare 3 digit random, number generator to 3 digit user input number. Ex Random nunber genarator generates : 254 and I guess

how do we compare 3 digit random, number generator to 3 digit user input number. Ex Random nunber genarator generates : 254 and I guess as user input 785......the result should tell me how many digits are IN PLACE and how many digits are OUT PLACE. In the above example...IN PLACE = 0 and OUT PLACE = 1 (number 5 is in 3rd position compared to the random generator which is in 2 nd place) Another example: random generates: 254 again... My user Input = 542.....IN PLACE = 0, and OUT PLACE = 3 (since all the digits are matching but it's not in the correct position as the random generator) (c++)

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!