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
algol13
3 years ago
13

Which type of error occurred in the following lines of code?

Computers and Technology
1 answer:
kvasek [131]3 years ago
8 0

Answer: Logical Error

The division by 0 is a logical error.

You might be interested in
What is the name of the first practical asymmetric cryptosystem that was created?
victus00 [196]

Answer:

I think the name is RSA

4 0
3 years ago
How to find how much storage is left on pc?
FinnZ [79.3K]
Go to your general settings and click on data usage and it should show you how much storage is left.
6 0
3 years ago
In JAVA please:
blagie [28]

Answer:

import java.util.Scanner;

public class ArraysKeyValue {

public static void main (String [] args) {

final int SIZE_LIST = 4;

int[] keysList = new int[SIZE_LIST];

int[] itemsList = new int[SIZE_LIST];

int i;

keysList[0] = 13;

keysList[1] = 47;

keysList[2] = 71;

keysList[3] = 59;

itemsList[0] = 12;

itemsList[1] = 36;

itemsList[2] = 72;

itemsList[3] = 54;  

/* Your solution goes here */

for ( i = 0; i < SIZE_LIST; i++){

 if (keysList[i]>50){

  System.out.println(itemsList[i] + " ");  }  }

System.out.println("");

}

}

Explanation:

I will explain the whole program flow.

  • There are two arrays here
  • keysList and itemsList
  • The first list (keysList) contains the following elements:

13 element at first position of the array (0th index)

47 element at second  position of the array (1st index)

71 element at third position of the array (2nd index)

59 element at fourth position of the array (3rd index)

  • The other list (itemsList) contains the following elements:

12 element at first position of the array (0th index)

36 element at second  position of the array (1st index)

72 element at third position of the array (2nd index)

54 element at fourth position of the array (3rd index)

  • The size of the array elements is fixed which is 4 and is stored in the variable SIZE_LIST.
  • Then the loop starts. The loop contains a variable i which is initialized to 0. First it checks if the value of i is less than the size of the list. It is true as SIZE_LIST=4 and i=0.
  • So the program control enters the body of the loop.
  • In first iteration, IF condition checks if the i-th element of the keysList is greater than 50. As i=0 So the element at 0th index of the keysList is 13 which is not greater than 50 so the body of IF statement will not execute as the condition evaluates to false. The value of i increments by 1 so now i becomes 1.
  • In next iteration loop again checks if the value of i is less than the size of the list which is true again so the body of the loop executes.
  • IF condition checks if the i-th element of the keysList is greater than 50. As i=1 So the element at 1st index of the keysList is 47 which is not greater than 50 so the body of IF statement will not execute as the condition evaluates to false. The value of i is incremented by 1 so now i becomes 2.
  • In next iteration loop again checks if the value of i is less than the size of the list which is true again as i= 2 which is less than SIZE_LIST so the body of the loop executes.
  • IF condition checks if the i-th element of the keysList is greater than 50. As i=2 So the element at 2nd index of the keysList is 71 which is greater than 50 so the body of IF statement is executed as the condition evaluates to true. So in the body of the IF statement there is a print statement which prints the i-th element of the itemsList. As i = 2 so the value at the index 2 of the itemsList is displayed in the output which is 72. Next value of i is incremented by 1 so now i becomes 3.
  • In next iteration loop again checks if the value of i is less than the size of the list which is true again as i= 3 which is less than SIZE_LIST so the body of the loop executes.
  • IF condition checks if the i-th element of the keysList is greater than 50. As i=3 So the element at 3rd index of the keysList is 59 which is greater than 50 so the body of IF statement is executed as the condition evaluates to true. So in the body of the IF statement there is a print statement which prints the i-th element of the itemsList. As i = 3 so the value at the index 3 of the itemsList is displayed in the output which is 54. Next value of i is incremented by 1 so now i becomes 4.
  • In next iteration loop again checks if the value of i is less than the size of the list which is now false as i=4 which is equal to the SIZE_LIST= 4. So the loop breaks.
  • So the output of the above program is:

72

54

5 0
3 years ago
Can I have help on this
never [62]

the answer is the seconf one


6 0
3 years ago
Read 2 more answers
Explain how QoS might be implemented
Artist 52 [7]

Answer:

 The quality of service basically provide the sufficient quality in the IP network and it is also known as traffic shaping. As, it assign the priority to every device and the services in the network. It basically recognize the several types of the traffic moving in the network.

The implementation of quality of service is basically done in many network applications by reserve the bandwidth and specific path in the network system.

The various network device control the packet flow so that the network resources can easily accept packets in the network.

 

 

6 0
3 years ago
Other questions:
  • Cell A1 contains the formula "=10+D2". If you copied A1 to B3, what would be the formula in B3?
    10·2 answers
  • Why is the cost of a software project not directly related to the cost of development?
    13·1 answer
  • Using the employment websites, search for part-time jobs that relate to the career fields you are interested in pursuing or to y
    12·2 answers
  • Write a simple hello world program in python 3
    8·2 answers
  • What is the largest value that can be represented by 6 binary digits? .
    5·1 answer
  • 1) Identify at least four examples and uses of application software.​
    5·2 answers
  • Why do attackers tend to target public or private Wi-fi networks?
    10·1 answer
  • Snippet 1: check_file_permissions.c #include
    9·1 answer
  • Hiiiiiiiiihwdawdfgthnythgrfergthyjuhgfd
    12·2 answers
  • The output of a computer can be seen on ( monitor, keyboard or mouse )​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!