subject

The luhn-10 algorithm is a weighted algorithm. each digit in the credit card number is multiplied by a weight. these weights are then summed, forming the checksum. the checksum is divided by 10. if the remainder is 0, the credit card number is valid. if the remainder is not 0, the user made an error and can be prompted to re-enter their credit card data. the weighting for the luhn-10 algorithm is as follows: beginning with the first (ie leftmost) digit in the credit card, every other number is multiplied by 2. if the product results in a 2 digit number (eg 6 x 2 = 12) then the individual digits (eg 1 and 2) are added to the checksum. the remaining digits of the credit card number are simply added to the checksum. that is, their weight is 1.some examples are given below, but this algorithm will work with your visa or mastercard number. try it! write a method in java named luhnchecksum which takes an array of integers as an input parameter and returns the integer checksum computed by the above algorithm.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
question
Computers and Technology, 22.06.2019 02:00
6. the is particularly susceptible to the effects of alcohol because it receives a large portion of total blood flow and has a high concentration of neurons. a. heart b. pancreas c. brain d. liver
Answers: 2
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
The luhn-10 algorithm is a weighted algorithm. each digit in the credit card number is multiplied by...
Questions
question
Mathematics, 14.01.2021 17:40
question
Chemistry, 14.01.2021 17:40
question
English, 14.01.2021 17:40
question
Mathematics, 14.01.2021 17:40
Questions on the website: 13722363