Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits. The starting numbe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits. The starting numbe

Post by answerhappygod »

Credit Card Numbers Follow Certain Patterns A Credit Card Number Must Have Between 13 And 16 Digits The Starting Numbe 1
Credit Card Numbers Follow Certain Patterns A Credit Card Number Must Have Between 13 And 16 Digits The Starting Numbe 1 (133.96 KiB) Viewed 7 times
Credit Card Numbers Follow Certain Patterns A Credit Card Number Must Have Between 13 And 16 Digits The Starting Numbe 2
Credit Card Numbers Follow Certain Patterns A Credit Card Number Must Have Between 13 And 16 Digits The Starting Numbe 2 (229.36 KiB) Viewed 7 times
Please provide screenshots of the code/output for reference.Thank you
Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits. The starting numbers are: 4 for Visa cards, 5 for MasterCard cards, 37 for American Express cards, and 6 for Discover cards. Example: Validating 438 85 76018402626 a) Double every second digit from right to left. If doubling of a digit results in a two-digit number, add the two digits to get a single digit number. b) Now add all single-digit numbers from Step a: 4+4+8+2+3+1+7+8 = 37 c) Add all digits in the odd places from right to left in the card number: 6+6+0+8+0+7+8+ 3 = 38 Sum the results from Step b and Step c: 37 + 38 = 75 e) If the result from Step d is divisible by 10, the card number is valid; otherwise, it is invalid. d) Please implement Credit Card Number Validation: 1. Function main is provided. Please implement isvalidcc and other functions which you may add to the program. Please do not change function main 8779 OWNH 2 LLLLAAAAA IN56780 10 11 12 13 14 15 16 2. 3. Your program must produce identical output: Assignment-03_PB_Run.pdf 18 17
1 2 3 4 5 567 7 8 06 9 371449635398431 is valid 4444444444444448 is valid 4444424444444440 is valid 4110144110144115 is valid is valid 4114360123456785 4061724061724061 is valid 5500005555555559 is valid 5115915115915118 is valid 5555555555555557 is valid is valid is not valid is not valid is not valid is not valid 10 6011016011016011 372449635398431 11 12 4444544444444448 13 4444434444444440 4110145110144115 14 15 4124360123456785 16 4062724061724061 17 5501005555555559 18 5125915115915118 67 is not valid is not valid is not valid is not valid
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply