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
USPshnik [31]
3 years ago
9

ISBN-13 is a new standard for identifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d12d13. The last digit d13 is a check

sum, which is calculated from the other digits using the following formula: 10 - (d1 3d2 d3 3d4 d5 3d6 d7 3d8 d9 3d10 d11 3d12) % 10 If the checksum is 10, replace it with 0. Your program should read the input as a string.

Computers and Technology
1 answer:
qwelly [4]3 years ago
5 0

Answer:

// Scanner class is imported to allow program

// read input from user

import java.util.Scanner;

// Solution class is created

public class Solution {

// main method that begin program execution

public static void main(String[] strings) {

// Scanner object scan is created

// it receive input via the keyboard

Scanner scan = new Scanner(System.in);

// a prompt is displayed for user to enter 12 digits of ISBN

System.out.print("Enter the first 12 digits of an ISBN as string: ");

// user input is assigned to input

String input = scan.next();

//if length of input is not 12, program display error message and quit

if (input.length() != 12) {

System.out.println(input + " is Invalid input");

System.exit(0);

}

// 0 is assigned to checkSum

int checkSum = 0;

// for loop that goes through the string and does the computation

for (int i = 0; i < input.length(); i++) {

// if the index is even

if ((i + 1) % 2 == 0) {

checkSum += (input.charAt(i) - '0') * 3;

}

// if the index is odd

else

{

checkSum += input.charAt(i) - '0';

}

}

// modulo 10 of checkSum is assigned to checkSum

checkSum %= 10;

// checkSum is substracted from 10

checkSum = 10 - checkSum;

// if checkSum equals 10, 0 is concatenated with input

// else input is concatenated with checkSum

if (checkSum == 10) input += "0";

else input += checkSum;

// the new value of the isbn-13 is displayed

System.out.println("The ISBN-13 number is " + input);

}

}

Explanation:

The program is written in Java and well commented.

A sample of program output during execution is also attached.

You might be interested in
Quick!! I'm TIMED!!!
agasfer [191]

Cloud suites are stored at a(n) option d. server on the Internet, rather than on your microcomputer.

<h3>What is a cloud at the Internet?</h3>

"The cloud" refers to servers which might be accessed over the Internet, and the software program and databases that run on the ones servers. Cloud servers are positioned in facts facilities all around the world.

A cloud suite is a cloud computing version that shops facts at the Internet via a cloud computing company who manages and operates facts garage as a service. It's brought on call for with just-in-time capability and costs, and gets rid of shopping for and handling your very own facts garage infrastructure.

Read more about the cloud suites :

brainly.com/question/5413035

#SPJ1

5 0
2 years ago
The primary benefit to client/server applications is that multiple people can be working with the same data at the same time
yawa3891 [41]

Answer:

uhhh false i think

Explanation:

3 0
3 years ago
Read 2 more answers
. simulation programs can use a range of integer values to mimic variability in the simulation. a. true b. false
RSB [31]

True, simulation programs can use a range of integer values to mimic variability in the simulation.

What are simulation programs ?

The foundation of simulation software is the process of simulating a genuine phenomena using a set of mathematical equations. In essence, it's a program that enables the user to simulate a process while still observing it in action.
It is theoretically possible to simulate on a computer any phenomenon that can be reduced to numerical values and equations.
Identifying the most crucial elements that have an impact on the simulation's objectives is one of the tricks to creating useful simulations.

Therefore, simulation programs can use a range of integer values to mimic variability in the simulation.

You can learn more about simulation programs from the given link:

brainly.com/question/27159343

#SPJ4

5 0
2 years ago
When is it not a good idea to remove a program from your computer by simply deleting its directory?
hodyreva [135]

Hi!

Usually computer programs have a lot of settings that, if not standardized, would make it super difficult to communicate with the operating system or other programs. Because of this, programs and the Windows Operating System use a special Registry system in order to standardize crucial settings for both applications and the operating system itself.

If you were to remove a directory to try to uninstall a program, you're leaving behind the files in the registry (don't worry though, it won't affect anything in terms of what your computer does) which can sometimes eat up space if there's enough of them.

Therefore, I would say your best bet is C. If the program adds information to the operating system.

I hope my answer helped!

5 0
3 years ago
Define types of hacker ? with three to four line of each types?​
Strike441 [17]
1.) benevolent hackers are hackers that use their skills to assist people in getting back stolen information, and usually put bad people in their place
2.) malevolent hackers use their skills to cause harm to others by either stealing information or leaking it, hacking into social media accounts or by infiltrating computers and implanting malware of some kind, but this isn’t normally done by hacking, you can do it just by sending an email with a sneaky link or virus in it.
Those are the two main types but there are also hackers who work for the government as cyber security protection or even to hack into targets of the government.
5 0
3 years ago
Other questions:
  • Suppose that some company has just sent your company a huge list of customers. You respond to that company with a strongly worde
    15·1 answer
  • The word count of the active document is typically displayed on the ________.
    15·1 answer
  • Ok so sometimes when i do something i see a box with a question mark in it, how do i remove it, i am on a macOs High Sierra earl
    11·1 answer
  • HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
    6·1 answer
  • QUESTION 16
    14·1 answer
  • What is the uniquely identifiable element about which data can be categorized in an entity-relationship diagram?
    6·1 answer
  • Present a detailed data model for your project scenario. You can create your data model using Microsoft Visio 2010, which you wi
    10·1 answer
  • Is there SUM in Small basic? ​
    7·1 answer
  • What does the abbreviation BBC stands for?
    15·2 answers
  • An interactive online representation of geospatial data, which can be accesses via a Web browser is a(an): a. Web Application b.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!