subject

Write a program that reads from a list of credit cards and determines if those cards are valid. Each file provided encodes the credit card numbers are longs. In binary, read each long and process the card.

To determine if a credit card is valid, use the following algorithm.

From the rightmost digit, which is the check digit, and moving left, double the value of every second digit. The check digit is not doubled; the first digit doubled is immediately to the left of the check digit. If the result of this doubling operation is greater than 9 (e. g., 8 Γ— 2 = 16), then add the digits of the result (e. g., 16: 1 + 6 = 7, 18: 1 + 8 = 9) or, alternatively, the same final result can be found by subtracting 9 from that result (e. g., 16: 16 βˆ’ 9 = 7, 18: 18 βˆ’ 9 = 9).

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 25.06.2019 08:30
In the context of intentional computer and network threats a is a programming routine built into a system by its designer
Answers: 2
question
Computers and Technology, 25.06.2019 12:00
Matching 1. many steps descending into a solution 2. the technological process known for its high degree of precision 3. method that allows developers freedom when they are writing software a.)six sigma b.)agile software development organization c.)waterfall method
Answers: 1
You know the right answer?
Write a program that reads from a list of credit cards and determines if those cards are valid. Each...
Questions
question
Social Studies, 31.01.2020 04:45
Questions on the website: 13722367