laiban123456 laiban123456
  • 02-07-2020
  • Computers and Technology
contestada

Q) write a code that reads a given array and calculates the SUM of its elements.

Respuesta :

Plus16463574585
Plus16463574585 Plus16463574585
  • 02-07-2020

Answer:

See the explanation below.

Explanation:

If don't know which language you are using, but the basic pseudo code for this problem will be:

variable sum = 0;

for ( i = 0;  i < array.length;  i ++) {

    sum += array[i];

}

print(sum);

Best Regard!

Answer Link

Otras preguntas

Kendra has a painting canvas that is 20 inches wide by 37 inches high. She painted a red rose, which covered 50% of the canvas. What was the area of the canvas
What is the value of X 56•
A diagonal shortcut across a rectangular lot is 130 feet long. The lot is 50 feet long. What is the other dimension of the lot
An example of a natural monopoly product is: A. electricity service B. an automobile C. a grocery store D. gasoline
Dr. proctor is conducting an experiment to see if hummingbirds will visit red flowers more or less often than they visit yellow ones. what will be the independe
Selective pressures created by environmental factors can lead to success of __________ individuals in a population.
What kind of documents does publisher handle best?
1.04 properties of water
How do you calculate the total resistance in a series circuit with more than one resistor?
What does Ponyboy learn about Dallas on their drive back home?