I need to compile a C++ program that simulates the authentication process. Store an actual PIN number in your program. The program should use an array to assign random numbers to the digits from 0 to 9. Display the random digits on the screen, input the answer from the user, and display whether or not the user's response correctly matches the PIN number.
Your comparisons between the characters of Input and the elements of Generated_Num almost certainly will not work the way you think. Comparison with == will compare the ASCII code of the character with the number inside the integer array.
I'm not really sure what you are trying to do. Generate a random array then ask the user to repeat it back to you? If so, then why are you checking the characters of the input against (seemingly) arbitrary 'digits' in the generated number?
I just joined this forum to post this because your program prompt blew me away.
My roommate literally has the exact same question in his C++ class, he asked me to help him with it but I couldn't even wrap my head around what they were wanting him to do. Hopefully someone more insightful will help you out!