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
When selecting a color scheme for a project which two things should you consider?
Vsevolod [243]

colorfulness and depending on your teacher pick colors that will go together on the project

6 0
3 years ago
An excel file called “student_gpa” is opened. What does the funnel next to “GPA” indicate
Ivan

Answer is A. The data has been filtered

The funnel in Excel lets you know that there is a filter in place on the columns. It is a filter icon. By default, any filtered column in Excel gets a little funnel icon on the top row as shown in the image attached. Once this funnel symbols is clicked, it gives you options to filter using several criteria.

6 0
3 years ago
Clicking on the cube that appears in the top right of the 3D view window will: (1 point)
german

Answer:

The correct option is;

Toggle between orthographic and perspective views

Explanation:

On a game design program such as Unity 3D, when the cube with colored pointers that can be located on the 3D view window is clicked, it will bring about a switch between the perspective or 90 degrees and orthogonal views which enables the display of the object in three dimension that appears more like real life figures.

5 0
3 years ago
The Online Shopping system facilitates the customer to view the products, inquire about the product details, and product availab
jeyben [28]

Answer:

see explaination

Explanation:

We will consider the five Actors in the prearranged Online shopping software system:

Customer:

The scheme allows the customer to do below mention actions:

View goods and inquire about the niceties of products and their ease of use.

To create version to be able to purchase invention from the structure.

Browse crop through search category or shortest search alternative.

Place order for the necessary crop.

Make sum for the order(s) positioned.

Payment System:

Payment system allows client to pay using subsequent two methods:

Credit card.

PayPal.

Seller:

System allow seller to perform underneath actions:

Place the foodstuffs for selling under apposite product category.

Create account to happen to a member.

Administrator:

Following actions are perform by Admin:

Manage the goods posted in the system.

Modify existing manufactured goods categories or add novel categories for foodstuffs.

Site Manager:

System privileges Site director with the following role in the system:

View information on:

Orders Placed by customer

Products added by seller

Accounts created by users

check attachment

3 0
3 years ago
Which of the following is a group of computer systems and computing hardware devices linked together through various communicati
Art [367]
Digital network, as it refers to the series of connected and linked computing devices into a network as described in this question.
6 0
1 year ago
Other questions:
  • The code segment below uses the procedure IsPartOf (list, item), which returns true if item appears in list and returns false ot
    13·1 answer
  • ​_____ was the first commercially successful computer. ​z3 ​eniac ​univac ​colossus
    13·1 answer
  • All of the following are challenges presented by changing technology as it relates to the special events field EXCEPT: A. the ab
    13·1 answer
  • Anyone understand coding? Please Help! Thank you! :)
    8·1 answer
  • I need help with writing the code in Python that draws an arrow pointing to the right.
    15·1 answer
  • All computer systems have
    14·2 answers
  • What is the right age to start coding in high school?
    11·1 answer
  • WILL GIVE BRAINLIEST!!!!!! 10 POINTS!!!!
    14·2 answers
  • The process of learning by making mistakes and by trial and error is called _____.
    6·1 answer
  • Which window would show you bindings for local area connection 2?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!