Question: Problem: Your preferred banking institution is requiring that you change your five digit PIN in the name of security. One requirement of your new PIN

Problem: Your preferred banking institution is requiring that you change your five digit PIN in the name of security. One requirement of your new PIN is that it cannot share any digit at the same place with your current PIN. Given both the current and new PIN print the total number of invalid digits. Both PIN values will be in the range [00000, 99999]. Example Execution #1 ('3' digit in the hundreds place is common to both PINs): Enter your current PIN: 12345 Enter your new PIN: 98310 Total number of invalid digits: 1 Example Execution #2: Enter your current PIN: 01010 Enter your new PIN: 10101 Total number of invalid digits: 0 Example Execution #3: Enter your current PIN: 12345 Enter your new PIN: 22345 Total number of invalid digits: 4 Example Execution #4: Enter your current PIN: 99999 Enter your new PIN: 00000 Total number of invalid digits: 0 Example Execution #5: Enter your current PIN: 13433 Enter your new PIN: 43133 Total number of invalid digits: 3 Example Execution #6: Enter your current PIN: 19183 Enter your new PIN: 28273 Total number of invalid digits: 1 Example Execution #7: Enter your current PIN: 12244 Enter your new PIN: 44241 Total number of invalid digits: 2 Please review the ASSIGNMENT REQUIREMENTS for this program. The use of selection, including logical and relational operators, is prohibited. The techniques necessary to solve this problem are similar to the examples found on pages 100-101 of your course notes packet
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
