subject

The following checksum formula is widely used by banks and credit card companies to validate legal account numbers: d0 + f(d1) + d2 + f(d3) + d4 + f(d5) + . . . = 0 (mod 10) The di are the decimal digits of the account number and f(d) is the sum of the decimal digits of 2d (for example, f(7) = 5 because 2 x 7 = 14, and 1 + 4 = 5). For example, 17327 is valid because 1 + 5 + 3 + 4 + 7 = 20, which is a multiple of 10. Implement the function f and write a program to take a 10-digit integer as a command line argument and print a valid 11-digit number with the given integer as its first 10 digits and the checksum as the last digit. Check that when applying the formula to the 11-digit number, the result after mod 10 is 0.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
You know the right answer?
The following checksum formula is widely used by banks and credit card companies to validate legal a...
Questions
question
History, 22.03.2021 06:00
question
Mathematics, 22.03.2021 06:00
question
Advanced Placement (AP), 22.03.2021 06:00
Questions on the website: 13722359