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
Talja [164]
3 years ago
12

(50 points) Write a programthat adds the first and last elements of an integer array and stored as the first element of the outp

ut array, adds the second and second-to-last elements and stored as the second number, and so on. If the array hasan odd number of integers, leave the central integer inthe original arrayunchanged.
Computers and Technology
1 answer:
Elena L [17]3 years ago
3 0

Answer:

A is the input array

B = [] ; %B is initially an empty array

for i = 1:length(A)/2  %iterates over A until the midpoint of A

   B(i) = A(i) + A(end + 1 - i);  %This adds the numbers from the first half and %second half of A, and stores in B

end

disp(B)

You might be interested in
In a Comparative Government course, the first unit focuses on the US Congress and the
Alona [7]
Answer: The answer is Summarization
8 0
3 years ago
Date criteria are automatically enclosed in ____ when entered in a query design.
inysia [295]
Enclosed in number signs ######
4 0
3 years ago
The ratio of boys and girls is 4:5 calculate the number of boys if the are 1080 learners in schools​
inna [77]

Explanation:

The ratio of Boys =  4x

The ratio of  Girls =  5x

The Number of Boys in the School = 4x + 5x = 1080

                                                          =         9x = 1080

                                                          =           x  = 1080/9

<em>                                                          </em> =           x  = 120

The ratio of Boys = 4x  = 4 x 120 = <em>480</em>

The ratio of  Girls =  5x = 5 x 120 = 600

<u></u>

Answer :-   <u><em>The ratio of Boys =480</em></u>

                 

8 0
3 years ago
Why are computer simulations useful in studying phenomena in the universe?
amid [387]

Answer:

Explanation:

Computer simulations are helpful because they can handle the computation of a big number of variables, at the same time. The universe is a constantly changing place with many different variables changing other variables. Thus, a computer is ideal to simulate, or predict, real life phenomena because of its processing power.

7 0
2 years ago
Somehow I lost 1000 points!!! Does anyone know what happened? Is it possible that I was hacked? ​
Dima020 [189]

Answer:

Explanation:

You most likely lost 1000 points because you cheated to get them if not there is a possibility you were.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Im trying to learn c# for unity does anyone know any good sources
    10·1 answer
  • Assume that LO and HI have already been assigned as constants with LO &lt; HI, and x has been declared as DWORD in the data segm
    7·1 answer
  • What will be the values of ans, x, and y after the following statements are executed? int ans = 35, x = 50, y =50; if ( x &gt;=
    7·2 answers
  • Persuasion is when Someone speaks to crowd about love <br>○True<br>○False​
    10·1 answer
  • I dont understand this at all! PLZ help me
    14·1 answer
  • PLZ HELP! ANSWER (WITH CORRECT ANSWER AND EXPLANATION THAT ACTUALLY IS CORRECT) GETS BRAINLIEST!
    13·1 answer
  • Which model represents any process in general?
    6·1 answer
  • What were the social, political, cultural, or economic context in which the was invention made?
    14·1 answer
  • 5. What skill is unique to reading online?
    14·1 answer
  • According to behaviorism, instruction should provide necessary stimulus in order for
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!