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

Consider the following method:

Computers and Technology
1 answer:
kicyunya [14]3 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
Python exercise grade 10
Lemur [1.5K]

nums = []

while True:

   num = float(input("Enter a number: "))

   if num <= 0:

       break

   nums.append(num)

print("The largest number entered was",max(nums))

I wrote my code in python 3.8. I hope this helps.

5 0
3 years ago
g How safe is to have a LinkedIn account where you have published all the important information about yourself
irina [24]

Answer:

LinkedIn is very safe

Explanation:

LinkedIn is very safe, that being said you should never post private information about yourself anywhere that you do not want others to see/know. LinkedIn is a job recruiting and networking site, meaning that all the information that you have or will be publishing there should be related to your career. There is no reason for you to publish private information such as document numbers, social security number, address, bank account info, etc.

5 0
3 years ago
Read 2 more answers
Ssume that the timeout values for all three protocols
prisoha [69]

Answer:

The explanation of the question is described in the section below.

Explanation:

(a)

Go Back N :

A gives in a maximum of 9 pieces. Typically they will be sent back sections 1, 2, 3, 4, 5 and then re-sent segments 2, 3, 4 and 5.

B sends out 8 ACK's. They are 4 ACKS including 1 series and 4 ACKS with 2, 3, 4 and 5 series amounts.

Selective Repeat :

A sends in such max of 6 bits. Subsequently, segments 1, 2, 3, 4, 5 and earlier re-sent Segments 2 will be sent.

B assigns five ACKs. We are 4our ACKS with numbers 1, 3, 4, 5. However there is one sequence quantity 2 ACK.

TCP :

A assigns in a total of 6 bits. Originally, segments 1, 2, 3, 4, 5 and future re-sent Segments 2 have always been sent.

B sends five ACKs. There are 4 ACKS with either the number 2 series. There has been one ACK with a sequence of numbers 6. Remember that TCP always needs to send an ACK with a sequence number you anticipate.

(b)

This is although TCP utilizes convenient retransmission without searching for the time out.

So, it's the right answer.

4 0
3 years ago
Different he launc.<br>in function are available with MS-Excel<br>Many​
Kruka [31]

functions are available with MS-Excel..

1.count and sum

2.cell references

3.data and Time

4.text

5.lookup and reference

6.finanical

7.round

8.array formula

7 0
3 years ago
Write a loop to print 10 to 90 inclusive (this means it should include both the
Semmy [17]

Answer:

The loop in cpp language is as follows.

for(int n=10; n<=90; n++)

{

cout<<n<<" ";

count = count+1;

if(count==10)

{

cout<<""<<endl;

count=0;

}

}

Explanation:

1. The expected output is obtained using for loop.

2. The loop variable, n is initialized to the starting value of 10.

3. The variable n is incremented by 1 at a time, until n reaches the final value of 90.

4. Every value of n beginning from 10 is displayed folllowed by a space.

5. When 10 numbers are printed, a new line is inserted so that every line shows only 10 numbers.

6. This is achieved by using an integer variable, count.

7. The variable count is initialized to 0.

8. After every number is displayed, count is incremented by 1.

9. When the value of count reaches 10, a new line is inserted and the variable count is initialized to 0 again. This is done inside if statement.

10. The program using the above loop is shown below along with the output.

PROGRAM

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   int count=0;

   for(int n=10; n<=90; n++)

   {

       cout<<n<<" ";

       count = count+1;

       if(count==10)

       {

           cout<<""<<endl;

           count=0;

       }

       

   }

   return 0;

}  

OUTPUT

10 11 12 13 14 15 16 17 18 19  

20 21 22 23 24 25 26 27 28 29  

30 31 32 33 34 35 36 37 38 39  

40 41 42 43 44 45 46 47 48 49  

50 51 52 53 54 55 56 57 58 59  

60 61 62 63 64 65 66 67 68 69  

70 71 72 73 74 75 76 77 78 79  

80 81 82 83 84 85 86 87 88 89  

90

1. In the above program, the variable count is initialized inside main() but outside for loop.

2. The program ends with a return statement since main() has return type of integer.

3. In cpp language, use of class is not mandatory.

8 0
4 years ago
Other questions:
  • In the lab, you performed an asset identification and classification exercise by creating a(n) __________ organized within the s
    10·1 answer
  • A broadband router is used to do which of the following? run the programs on a computer locate lost files on a computer manage a
    6·1 answer
  • Technician A says that a ratio is a comparison between two values. Technician B says that in a compression ratio, the main value
    5·1 answer
  • Excel recognizes an entry as a value if it is a number or it begins with ____
    8·1 answer
  • In a typical e-mail address the host is
    14·1 answer
  • Which invention spurred the development of the digital camera?
    8·1 answer
  • A bear is an animal and a zoo contains many animals, including bears. Three classes Animal, Bear, and Zoo are declared to repres
    12·1 answer
  • Why does atmospheric pressure does not effect on planes,jet planes and rocket?​
    9·1 answer
  • Question #5
    15·2 answers
  • Update thejavafile names to include your initials at the end, send .java file only.1. Completein-place heapSort, which takes an
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!