subject

Write a program ISBNChecksum. java that takes a 9-digit int as a command-line argument and displays the checksum digit according to the following rules: (IN JAVA PLEASE)

Multiply the first digit by 10, the second by 9, the third by 8, and so on, down to the ninth digit by 2.
Add the values together.
Divide the sum by 11. What is the remainder?
If the remainder is 0, the checksum is 0; otherwise, subtract the remainder from 11 to get the checksum digit.
If the checksum that you come up with is 10, then X is used as the checksum digit!

As an example, the checksum digit corresponding to 020131452 is 5 since 5 is the only value of x between 0 and 10 for which10*0 + 9*2 + 8*0 + 7*1 + 6*3 + 5*1 + 4*4 + 3*5 + 2*2 + 1*x is a multiple of 11.

Hint 1: to extract the rightmost digit of a number use the modulus operator.
Hint 2: to remove the rightmost digit of a number use the integer division by 10
Hint 3: for full credit use a loop to compute the sum

Assume the input value used to test your program is a 9-digit positive integer. Also assume that the input is a valid ISBN number without the checksum digit.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
Write 150 words on what kind of website would you like to make in the future? what sites would you like to model yours after?
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
Your business be in google top rank.more the rank more the business leads.for best seo and digital marketing services be confident to contact you can get best seo solutions by assistance experts provide digital marketing, website development, seo expert services and social media internet seo expert services your branding solutions. seo expert services ,best seo expert services,online seo expert services,
Answers: 3
question
Computers and Technology, 24.06.2019 00:40
What is the error in the following pseudocode? module main() call raisetopower(2, 1.5) end module module raisetopower(real value, integer power) declare real result set result = value^power display result end module
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
You know the right answer?
Write a program ISBNChecksum. java that takes a 9-digit int as a command-line argument and displays...
Questions
question
English, 19.12.2020 15:50
question
Mathematics, 19.12.2020 15:50
question
Mathematics, 19.12.2020 15:50
question
Mathematics, 19.12.2020 15:50
question
English, 19.12.2020 15:50
question
Mathematics, 19.12.2020 15:50
question
Mathematics, 19.12.2020 16:00
Questions on the website: 13722361