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
Answer:
Hi!
The correct answer is one data field and two links fields.
Explanation:
The node of a doubly-linked list contains one data field, and two links fields that references to the next node on the list and another one link field that references to the previous node in the sequence of nodes).
Between the intersection between every column and row is a cell.
Because we have the domain name system (DNS). It registers friendly names, e.g., google.com that represent IP addresses. Your computer will consult a DNS service to query the IP address for a domain name you enter, and under-the-hood the connection is made to the IP address.