Answered step by step
Verified Expert Solution
Question
1 Approved Answer
All code must be in C++ using G++ compiler Write a program where a hacker tries to guess a PIN. The program should have an
All code must be in C++ using G++ compiler
Write a program where a hacker tries to guess a PIN. The program should have an array of five integers named PIN, and should initialize each PIN number with a random number in the range of 0 through 9. Now a hacker tries to guess the PIN stored in the system by entering 5 digits at the console. The system reads the numbers entered by the user into an array named GuessedPIN. After reading the numbers entered by the hacker, the program is to compare the corresponding elements in the two arrays and keep a count of the digits that match. For example, the following shows the PIN array and the GuessedPIN array with sample numbers stored in each. There are two matching digits (array elements 2 and 4) PIN Guessed PINStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started