Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Management Information System Expert

Question

Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits. It must start with 4 for Visa cards, 5 for Master cards, 37 for American Express cards, and 6 for Discover cards. In 1954, Hans Luhn of IBM proposed the following algorithm for validating credit card numbers:

a. Double every second digit from right to left (e.g., if number is 3 => 3 * 2 => 6) and add them together.

b. If this doubling results in a two-digit number, then add the two digits to get a single-digit number (e.g., if number is 5 => 5 * 2 => 10 => 1+0 => 1).

So, for the credit card number 4388576018402626, doubling all second digits from the right results in (2 * 2 = 4) + (2 * 2 = 4) + (4 * 2 = 8) + (1 * 2 = 2) + (6 * 2 = 12 = 1 + 2 = 3) + (5 * 2 = 10 = 1 + 0 = 1) + (8 * 2 = 16 = 1 + 6 = 7) + (4 * 2 = 8).

This totals to 4 + 4 + 8 + 2 + 3 + 1 + 7 + 8 = 37. Add all digits in the odd places from right to left.

The leftmost digit of the credit card number is at index 0; 6 + 6 + 0 + 8 + 0 + 7 + 8 + 3 = 38.

Add results from steps (a) and (b) and see if divisible by 10. If it is, then the card number is valid; otherwise invalid. 37 + 38 = 75 is not divisible by 10, so it is an invalid credit card number.

Implement Luhn's algorithm in a program to determine whether a given credit card number is valid or not. You must test if the number of digits in the input is in the valid range (13 to 16), run Luhn's algorithm to test its validity, and if it is valid, print the name of the company that offers that credit card number.

Management Information System, Management Studies

  • Category:- Management Information System
  • Reference No.:- M92078598
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Management Information System

Knowledge management systems and crmin answer to the

KNOWLEDGE MANAGEMENT SYSTEMS AND CRM In answer to the challenges Nelnet faces in servicing a growing volume of student loans, the company chose to deploy a knowledge management system called OpenText Process Suite. Go on ...

Assessment instructionsfor this assessment you will explain

Assessment Instructions For this assessment, you will explain how to secure your applications and operating systems using various security tools. Use the suggested resources, the Capella library, and the Internet to rese ...

Steve jobs was a strong charismatic leader who cofounded

Steve Jobs was a strong, charismatic leader who cofounded Apple and is credited with much of the success of the company. Some believe that Tim Cook, who became CEO in 2011, embraces a more collaborative leadership style. ...

The scenariomusic university has asked you to help them to

The Scenario Music University has asked you to help them to design their student performance data mart. Your requirements elicitation with the clients has determined that they are interested in answering questions such a ...

Answer the following question what are the basic reasons

Answer the following Question : What are the basic reasons that people resist change? How can this resistance be overcome? Write 300 Words. Include in-text citations and references in APA style formatting. Must have two ...

Suburban homes construction project quality management plan

Suburban Homes Construction Project Quality Management Plan (QMP) Prepare a quality management plan using the elements described in the PMBOK 6e (Section 8.1.3.1) for the Suburban Homes Construction Project. Content Over ...

Assessment instructionsin this assessment you will debug

Assessment Instructions In this assessment, you will debug and fix a given Java console application that uses two dimensional arrays, but the application does not compile nor execute. Your program output should look like ...

A timeline of cybercrime was discussed in class and can be

A timeline of cybercrime was discussed in class and can be found under the Course Materials. Research one of the crimes from the timeline and research article or case study discussing a cybercrime case that has happened ...

Make a power point presentation on conflict resolutionthese

Make a Power Point Presentation on Conflict Resolution. These conflicts can be work related or personal conflicts. Prepare 5 slides and make sure each slide has one academic reference. For each slide, you are only to use ...

Assignmentread the article titled when stuxnet hit the

Assignment Read the article titled "When Stuxnet Hit the Homeland: Government Response to the Rescue," from ABC News, threat in terms of incident response and recovery procedures. Write a three to four (3-4) page paper i ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As