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
kap26 [50]
2 years ago
9

Consider the following method:

Computers and Technology
1 answer:
kicyunya [14]2 years ago
7 0

The array contents after the method mystery were called are:

  • {3,3,4}
  • {0,3,3,2,1}
  • {4,3,4,2,1,2}
  • {2, 1, 2, 4, 5, 6, 2}
  • {1, 1, 1, 1, 1, 1, 1}

<h3>How to determine the array contents</h3>

The flow of the mystery method is as follows:

  • The method takes an array as its argument
  • It iterates from the elements at index 1 through index n - 1 (n represents the array length)
  • If the current element in the iteration adds up to the adjacent elements, the current element is halved.

Using the above flow, the array contents after the method mystery were called are: {3,3,4}, {0,3,3,2,1}, {4,3,4,2,1,2}, {2, 1, 2, 4, 5, 6, 2} and {1, 1, 1, 1, 1, 1, 1}

Read more about arrays at:

brainly.com/question/15683939

You might be interested in
Is(are) input value(s) to use with a program to test the accuracy of the output.
Law Incorporation [45]

Answer:

test cases

Explanation:

5 0
3 years ago
Read 2 more answers
You're a ticket agent for a commercial airline and responsible for checking the identification for each passenger before issuing
algol13

Answer:

Follows are the code to this question:

import java.util.*;//import package for user input  

public class Main //defining class  

{

  public static void main(String[] as)//main method

  {

      boolean x,y,z;//defining boolean variable

      Scanner ox= new Scanner(System.in);//create Scanner class object for user input

      System.out.println("input value: "); //print message  

      x=ox.nextBoolean();//input value

      y=ox.nextBoolean();//input value

      z=ox.nextBoolean();//input value

      System.out.println("Output: ");//print message

      System.out.println(x || (y &&z));//use print method to check value and print its value  

  }

}

Output:

1)

input value:  

true

false

false

Output:  

true

2)

input value:  

false

true

true

Output:  

true

3)

input value:  

false

false

false

Output:  

false

Explanation:

In the given code, inside the class three boolean variable "x,y, and z" is declared, that uses the scanner class for input the value from the user end, and in the next print, the method is declared, that uses " OR and AND" gate for calculating the input value and print its value.

In the AND gate, when both conditions are true. it will print the value true, and in the OR gate, when one of the conditions is true, it will print the value true.  

3 0
4 years ago
Which icons allows you to add a style to a chart
ZanzabumX [31]
Click on your chart and go under Table Tools, Design... then you should see the different styles. ;)
5 0
3 years ago
What two names are given to the blinking vertical line?
Paha777 [63]

Answer:

<u>see </u><u>below</u><u>:</u>

Explanation:

One is (the cursor).

Whenever you see a flashing vertical line called-the cursor--you can start typing.Note that the mouse pointer is also called a cursor,but it is shaped differently.The keyboard cursor is also called the insertion point.

5 0
3 years ago
What is a small handheld computer that performs simple tasks such as taking notes, scheduling appointments, and maintaining an a
antiseptic1488 [7]

is a small handheld computer that performs simple tasks such as taking notes, scheduling appointments, and maintaining an address book and a calendar PDA.

<h3><u>Explanation:</u></h3>

Personal Digital Assistant is the full form for PDA. PDAs are the computers in smaller size. They perform all works that are performed by a computer. They help you in viewing all the documents that you need, scheduling all your works,etc. They act as a mini sized computer that you can take where ever you go.

Using PDAs you can easily schedule any tasks, take notes, maintain all your contacts in address books,etc. Even though the markets of PDAs is not having higher demands because of the existence of i phones and other devices that are identical to i phones, there are still some usages and demands for PDAs. These are used in industries and businesses.

3 0
3 years ago
Other questions:
  • What element of a timeline helps to mark progress of the project?
    15·1 answer
  • A writing team wants to present the six-month sales figures for its company's 14 sales representatives in a report. Because mana
    11·1 answer
  • Now let's create a memo. The memo should include all parts of a memo, and these parts should appear in the correct order. In you
    9·1 answer
  • How many times would the following loop iterate?
    15·1 answer
  • Next, Kim decides to include a diagram of a frog’s life cycle in her presentation. She wants to use an image that is part of a p
    15·2 answers
  • Mary works for a multimedia firm, and she spends long hours on a desktop computer. Recently, she expired back pain and visited h
    12·1 answer
  • The loop function is similar to range(), but handles the parameters somewhat differently: it takes in 3 parameters: the starting
    14·1 answer
  • Janet received an email from a bank asking for the password for her Internet banking account. She emailed back her password. A f
    12·2 answers
  • Consider the following code:
    12·1 answer
  • Customer history is an example of what
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!