brandonrhodes8637 brandonrhodes8637
  • 03-03-2020
  • Engineering
contestada

What does the following program segment do? Declare Count As Integer Declare Sum As Integer Set Sum = 0 For (Count = 1; Count < 50; Count++) Set Sum = Sum + Count End For

Respuesta :

thamimspartan thamimspartan
  • 10-03-2020

1225

Explanation:

This segment helps initialize sum as 0. The for loop is used to increment with every execution and it is added to the sum. The loop runs 49 times and every time the count is added to the sum. In short it is the sum of first 49 natural numbers i.e 1+2+3+......+49.

Answer Link

Otras preguntas

Can u paraphrase the quote ”let things take their course”
Does the depth of a pan affect how water freezes?
What is the numerator or denominator of 4/5
How many minutes are in 36 hours?
How many minutes are in 36 hours?
What are two different ways to describe and label the layers of the Earth?
A 1 digit number and a 3 digit number have a sum of 205.  The same two number have a difference of 195, a product of 1,000 and a quotient of 40.  What are the t
Trying to translate word problems. Five times the sum of 3 and twice some number is 70. what is the number?
A 1 digit number and a 3 digit number have a sum of 205.  The same two number have a difference of 195, a product of 1,000 and a quotient of 40.  What are the t
How many minutes are in 36 hours?