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
Explain three tests that uses for tests normality​
Volgvan

Answer:

<h2>Methods used for test of normality of data. ... [10] There are various methods available to test the normality of the continuous data, out of them, most popular methods are Shapiro–Wilk test, Kolmogorov–Smirnov test, skewness, kurtosis, histogram, box plot, P–P Plot, Q–Q Plot, and mean with SD.</h2>

Explanation:

<h2>HOPE IT HELPS YOU</h2>
7 0
2 years ago
Read 2 more answers
A compiler is a separate program that converts the entire source program into a machine language before executing it
NISA [10]
A compiler is a series of programs that (usually) convert source code into machine language. There are also compilers that compile into byte code, Java for instance.

No compiler is responsible for executing a freshly compiled program. That would be done in an IDE (Integrated Development Environment).
4 0
3 years ago
As computer words get larger and larger, there is a law of diminishing returns: the speed of execution of real application progr
otez555 [7]

Answer:

Explanation:

I can pick a reason out of many, and that would be the software. The fact is that, even as they are computers and machines, the softwares themselves have particular design cap. A software that was designed for systems with a narrow word size will most likely have issues as more and more words are used on it. I don't know if you understand what I'm saying, everything has a cap, once that particular meter is approaching, systems tend to slow onwards.

When it comes to the hardware part using the same technology, it might take a longer time to do basic arithmetic on larger inputs.

When you're under using a system, it tends to have a lot of space, excess, to perform its functions, but as soon as it is nearing its limit, it will slow down so as to accommodate all the processes at once.

3 0
3 years ago
Which option correctly completes this statement? Programs can repeat simple instructions very quickly to I. help human users to
inna [77]

Answer:

I, II only

Explanation:

A computer program is a compilation of instructions and commands that can be executed by a computer to carry out a specific task. Most computer devices can only function optimally with the help of a program.

Programs can repeat simple instructions very quickly in order to assist individual users to recognize images and sound effortlessly and to get rid of the drudgery of repeating instructions and commands by hand

5 0
3 years ago
How do printers work.
natulia [17]
This question really depends on the type of printer device. There are the following kinds of printers:
Inkjet
Laser
Thermal
Dye Sublimation
Dot Matrix
Solid Ink

Each of these types of printers print in very different ways. I'm not going to get into depth about all of them, as that would take too much time. But what I can do is explain to you what a logical printer object is. So when you think of a printer, you think of the actual printer hardware. However, there are three distinct parts to a printer. These three parts are: the <em>print device, the driver, and the spooler</em>. Essentially what happens is that these three components communicate with one another in order to complete print jobs. So lets say I have a wireless network laser printer which is connected to a wireless access point, along with three other workstations. Then let's say that those three workstations want to send print jobs to the network printer. What happens is that all of those print jobs are <em>spooled</em>, meaning they are placed into a print queue. The driver then takes print jobs out of the print queue at the printer object's leisure. The driver then encodes the data from the print job into a language which the print device can understand, an example being PostScript. Then the driver sends that print job to the print device, and depending on what kind of printer you have, the method in which that print job is completed varies.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Web browsers communicate with web servers using the ____ communication protocol.
    13·1 answer
  • Weather satellites orbit Earth at an altitude of 1,400,000 meters. What is this altitude in kilometers?
    7·1 answer
  • A typeface in which each character has the same width and is often used to display programming code is _
    8·1 answer
  • What type of program would you use to create a personal budget?
    9·1 answer
  • How many instructions can the microprocessor execute each second if the assembly line is present?
    12·1 answer
  • What is an activity that can help you enhance the appearance of your computer’s desktop?
    13·1 answer
  • Anyone help pls ? Complete the code below to add css to make the background of the web page orange.
    10·1 answer
  • Which programming language uses objects?<br> O C++<br> O ALGOL<br> O Pascal<br> O BASIC
    14·2 answers
  • What computer has special software that allows it to deliver web pages to the Internet?
    13·2 answers
  • You are almost finished updating a Website. As part of the update, you have converted all pages from HTML 4.0 to HTML5. The proj
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!