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 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
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
Mathematics, 23.07.2021 07:10
question
World Languages, 23.07.2021 07:10
question
Advanced Placement (AP), 23.07.2021 07:10
question
Mathematics, 23.07.2021 07:10
question
Mathematics, 23.07.2021 07:10
Questions on the website: 13722361