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
How can you have a safe browser experience
goldfiish [28.3K]

Most likely the answer is to delete cookies, as it cuts down on the amount of tracking sites can do to you.

6 0
3 years ago
___________ connects different types of computers in LAN?
strojnjashka [21]

Answer:

a) Switch

Explanation:

hope this helps you

8 0
3 years ago
Read 2 more answers
Please Answer Quickly.<br> Match the item on the left with the reason that it is false on the right.
Varvara68 [4.7K]

Answer:

me desculpe mais eu preciso de pontos para ajudr meu irmão autista

5 0
2 years ago
In the borders and shading dialog box where would you look to see if your border will have two sides
arlik [135]
On the preview box? I think. 
6 0
3 years ago
Read 2 more answers
The capacity of a communication channel is measured in _______.
PSYCHO15rus [73]
<span>The capacity of a communication channel is measured in gb and gps.</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • why is it important to use a general search engine, like GOOGLE, to look up the name of the organization, institution, agency or
    7·1 answer
  • Given the following class import java.util.ArrayList; public class RectangleTester { public static void main(String[ ] args) { A
    7·1 answer
  • . Constructors can / cannot (circle correct choice) be called explicitly as if they were regular member functions.
    10·1 answer
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • Which statement describes one drive?
    6·1 answer
  • How have productivity programs improved the professional lives of people? (check all that apply)
    8·2 answers
  • One of the most common uses of spreadsheet are
    8·1 answer
  • Does this mechanism increase or decrease speed? Why?
    9·1 answer
  • Question 1 of 10
    12·1 answer
  • Which one of these are a valid IPv4 address?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!