Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ 2-24 2- 2-4 4 2 8 1 2 2 PART B-Credit Card Number Validation, 10 points Credit card numbers follow certain patterns. A

image text in transcribed
in c++
2-24 2- 2-4 4 2 8 1 2 2 PART B-Credit Card Number Validation, 10 points 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 6-2 12 (1+2 3) 5-2 10 (101) 8-2-16 (1+6-7 Example: Validating 4388576018402626 4-2 8 a) Double every second digit from right to left. If doubling of a digit results37445635393431 444444444444448 valid valid a two-digit number, add the two digits to get a single digit number. 2 b) Now add all single-digit numbers from Step a c) Add all digits in the odd places from right to left in the card number d) Sum the results from Step b and Step e) If the result from Step d is divisible by 10, the card number is valid; 4+4+8+2+3+1+7+8 3 6+6+0+8+0+7+8+3 38 37 + 38 75 3 4444424444444440 18 valid 4 4110144110144115 1 valid 5 421436012345678s is valid 6 4061724061724061 8 valid 7 5500005555555559 1s valad 5115915115915110 1S valid 9 55555555$5555557 1s vai1d 0 6011016011016011 9 valid otherwise, it is invalid 372449635398431 is not valid 12 4444544444444440 is not vaiid 41102451101441is i not valid 5501005555555559 is not valid Please implement Credit Card Number Validation: 1. Function main is provided. Please implement isvalidcc and other 3 4444434444444440 1s not vali functions which you may add to the program. 2. Please do not change function main 3. Your program must produce identical output: ASMTO2 P8 Run.pdf 5 412436012345678s in not valid valid 6 4062724061724061 s not 0 s125925115915 s ia not valid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

Students also viewed these Databases questions

Question

What are the cultural/ethnic/religious traits of your key public?

Answered: 1 week ago

Question

1. How do most insects respire ?

Answered: 1 week ago

Question

Who is known as the father of the indian constitution?

Answered: 1 week ago

Question

1.explain evaporation ?

Answered: 1 week ago

Question

Who was the first woman prime minister of india?

Answered: 1 week ago

Question

Explain the concept of going concern value in detail.

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago