Computers and Technology
Computers and Technology, 13.02.2020 03:23, blaze9691

Suppose you type a 14-digit credit card number into a Web site, but mistype one of the digits or inadvertently interchange two adjacent digits. The Web site will perform a validation check that always detects the first type of error and nearly always detects the second type of error. The validation check is as follows:
1) Starting with the leftmost digit, double it and then double every other digit after it. However, if any of the doubled digits is a two-digit number, subtract 9 from it. Then sum these new digits. For instance, if the credit card number is 58667936100244, then the digits considered are 5,6,7,3,1,0,4, their new replacements are 1,3,5,6,2,0,8, and the sum of the replacements is 25.
2) Sum together the remaining seven digits from the credit card number. That is, the digits in the odd-numbered positions. With the credit card number above, we obtain 8 + 6 + 9 + 6 + 0 + 2 + 4 = 35.
3) Add together the two sums. If the result is a multiple of 10, then accept the credit card number. Otherwise, reject it. We accept the credit card number above since 25 + 35 = 60, a multiple of 10. Write a program that performs data validation on a credit card number. One possible outcome (sample data): Enter a credit card number: 58667936100244 The number is valid.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:31, caseypearson377
Acloud service provider uses the internet to deliver a computing environment for developing, running, and managing software applications. which cloud service model does the provider offer? a. iaas b. caas c. maas d. paas e. saas
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, sebcbal
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
image
Computers and Technology, 24.06.2019 17:50, connorwbrown07
Acontact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. write a program that first takes in word pairs that consist of a name and a phone number (both strings). that list is followed by a name, and your program should output that name's phone number.
Answers: 1
image
Computers and Technology, 24.06.2019 20:00, diangeloortiz
Which element will you include to present numerical on a slide? a: graph b: text c: flowchart d: shapes
Answers: 1
Do you know the correct answer?
Suppose you type a 14-digit credit card number into a Web site, but mistype one of the digits or ina...

Questions in other subjects:

Konu
Mathematics, 13.11.2019 06:31
Konu
English, 13.11.2019 06:31
Konu
Mathematics, 13.11.2019 06:31