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

seven less than twice a certain number n
For the equation bacl2 na2so4 → baso4 2nacl, how many chlorine atoms are in the reactants side and the products side
What deal did Democrats and Republicans make regarding the presidential election of 1876? 1.The president would be a Democrat, and the vice president would be a
health science help please? Patient information can be viewed by fewer people in healthcare settings if it is kept in electronic form rather than in paper recor
Does the interest rate increase at a constant rate
can plants talk? I'm super confuzzled!!!!!
Julian describes an angle in the triangle using these statements. GH is the adjacent side. HK is the opposite side. GK is the hypotenuse. Which angle(s) i
Which of the following sentences is correct? A. A clause is a group of related words, but a phrase is not. B. A phrase has a subject and verb, but a clause doe
what is the side length of a cube that has a volume of 0.008 m a.0.000000512 m b.0.002 c.0.02 d.0.2
please help me :) can you give it to me step by step . thank you ❤