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

Who does a U.S. Senator represent?
When a sample of a gas is heated in a sealed, rigid container from 200. K to 400. K, the pressure exerted by the gas is (1) decreased by a factor of 2. (2) incr
examples of elastic and inelastic goods... ( at least 20 examples) URGENT..............
Compared to the physical and chemical properties of the compound NO2 the compound N2O has (1) different physical properties and different chemical properties (2
What is a hyperbole?
The coefficients in a balanced chemical equation represent (l ) the mass ratios of the substances in the reaction (2) the mole ratios of the substances in the r
When a sample of a gas is heated in a sealed, rigid container from 200. K to 400. K, the pressure exerted by the gas is (1) decreased by a factor of 2. (2) incr
What does the judicial branch do?
Name one state that borders Mexico.
What are two rights of everyone living in the United States?