1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Usimov [2.4K]
3 years ago
9

for java ?(Business: check ISBN-13)ISBN-13 is a new standard for identifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d1

2d13. The last digit d13 is a checksum, which is calculated from the other digits using the following formula:10 - (d1 + 3d2 + d3 + 3d4 + d5 + 3d6 + d7 + 3d8 + d9 + 3d10 + d11 + 3d12) % 10If the checksum is 10, replace it with 0. Your program should read the input as a string.Display "invalid input" if the input is incorrect.Sample Run 1Enter the first 12 digits of an ISBN-13 as a string: 978013213080The ISBN-13 number is 9780132130806Sample Run 2Enter the first 12 digits of an ISBN-13 as a string: 978013213079The ISBN-13 number is 9780132130790Sample Run 3Enter the first 12 digits of an ISBN-13 as a string: 9780132097801320 is an invalid inputClass Name: Exercise05_47
Computers and Technology
1 answer:
ludmilkaskok [199]3 years ago
6 0

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 String isbn;

 System.out.print("First 1:2 digits: ");

 isbn = input.nextLine();

 if(isbn.length()==12){

 int chksum = 0;

 for(int i = 0; i<12;i++){

     if((i+1)%2==0){      chksum+= 3 * Character.getNumericValue(isbn.charAt(i));          }

     else{          chksum+=Character.getNumericValue(isbn.charAt(i));          }  }

 chksum%=10;

 chksum=10-chksum;

 if(chksum==10){

 System.out.print("The ISBN-13 number is "+isbn+"0");}

 else{

 System.out.print("The ISBN-13 number is "+isbn+""+chksum);          }   }

 else{

     System.out.print("Invalid Input");

 }     }}

Explanation:

See attachment for explanation where comments are used to explain each line

Download txt
You might be interested in
You have been asked to implement enterprise software for a manufacturer of kitchen appliances. What is the first step you should
Amiraneli [1.4K]

Answer:

Option E i.e., Select the functions of the system you wish to use is the correct answer.

Explanation:

In the above statement, some part of the question is missing that is options.

The first step is taken by the user is that they have been select those methods of the computer system which he wants to use firstly if he has to implement the software or an application for that manufacturers who sales the appliances of the kitchen. Then, it is necessary to take the following steps by the user according to its needs.

8 0
3 years ago
A database record can best be described as:
ratelena [41]

Answer:

The answer to this question is given below in the explanation section

Explanation:

The correct option to this question is D.

A database record can be best described as the collection of information consisting of one or more related fields about a specific entity. Because a database record represents a record about a specific entity for example a student record studying in a school. A student is a specific entity in the database and it has one or more related fields, for example, name, class, courses in which enrolled etc.

others options are not correct because:

A: a database record is a collection of data about a specific entity and it is not about a limited topic.

B: all database records can be sorted and searched using search algorithms but it is not necessarily because you can search data sometimes using quarries etc.

C: a database record is not a category of information in a table but it is a collection of one or more related field about a specific entity.

5 0
4 years ago
What aspect do you need to keep in mind when you add images in a word document?
Trava [24]

While adding images in word you cant do anything with the picture unless you add Wrap text. Usually the wrap text icon is always beside the pic or you can go to Layout or format and select from there. If you're adding a photo between an article, position  works well. You can change the wrap text and position choices according to your needs.

Hope this helps, Please mark as brainliest

5 0
3 years ago
Read 2 more answers
The goal of the ____ memory allocation algorithm is to find the smallest memory block into which a job will fit.
Pani-rosa [81]
The goal of the BEST-FIT memory allocation algorithm is to find the smallest memory block into which a job will fit.
5 0
2 years ago
Read 2 more answers
Of the measures of feasibility in the accompanying figure, ____ considers points such as "Does the proposed platform have suffic
Olin [163]

Answer:

technical feasibility

Explanation:

This is the process of validating the technology assumptions, architecture and design of a product or project. A technical feasibility study shows the details of how you intend to deliver a product or service to customers. Puts into consideration the following :

materials, labor, transportation, where your business will be located, and the technology that will be necessary to bring all this together.

3 0
3 years ago
Other questions:
  • What are the three most important jobs of an operating system?
    8·1 answer
  • The ____ is a single user, nonportable computer designed to perform engineering, cad, and software development work.
    9·1 answer
  • If a small monster collector has 20 small monster containment devices; intends to use all of those devices; has access to non-un
    13·1 answer
  • Consider a classStudent. The following code is used to create objects and access its member functions. Which statement is true a
    6·1 answer
  • Design aPayrollclass that has fields for an employee’sname, ID number, hourly pay rate,and number of hours worked. Write theappr
    9·1 answer
  • Rebecca completed work on a computer and is verifying the functionality of the system when she finds a new problem. This problem
    14·1 answer
  • How do you mark someone brainliest? The person with the best explanation gets brainliest.
    11·2 answers
  • If a variable uses more than one byte of memory, for pointer purposes its address is: Group of answer choices the address of the
    12·1 answer
  • 1. Assuming you are downloading a 100MB (800Mb) file on a Network that can download data at 54Mbps.
    15·1 answer
  • us refe rence: so 1 ac 2 2. describe the applications for merged documents in terms of the following benefits 2. describe the ap
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!