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

Trying to translate word problems. Five times the sum of 3 and twice some number is 70. what is the number?
How does transpiration play a  role in the water cycle ?
What is a direct combination reaction?
is it possible for a distance versus-time graph to be a vertical line?
Can u paraphrase the quote ”let things take their course”
What is two thirds minus six thirds
What is Sir Francis Drake hardships
in what ways is climate controlled by the sun and the water cycle ?
in an expression(8/9) squared (-81)+3/5dividedby-9/10
What is two thirds minus six thirds