Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step1: Read in credit card number as a series of digits into an array the number -1 is used to indicate the end of series,

image text in transcribedimage text in transcribedimage text in transcribed

Step1: Read in credit card number as a series of digits into an array the number -1 is used to indicate the end of series, no need to read in -1 into the array The maximum size of the array is set to 20 Step2: Find sum1 (main should call a function passing array and size) lgnoring the last (right most digit) check digit of the credit card number, and moving left double the value of every second digit and find the sum of these doubled numbers. If the result of the doubling operation is a two digit number, you should add the digits of the doubled number before finding the sum. Step 3: find sum2 (main should call a function passing array and size) Find the sum of all other numbers (last digit is not included in this sum as well). Step 4: Calculate check sum Compute the total of sum1 and sum2 and multiply the result by 9, checksum is found by extracting the rightmost digit

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago