Respuesta :

Answer:

Algorithm to calculate the average of numbers is

  1. Start
  2. sum = 0, i = 1, average, count = 0
  3.  if i / 2 == 0 then go to step 4, else go to on step 5
  4.  sum = sum + i, count = count + 1
  5.  i = i + 1
  6. if i <= 50 then go to on step 3, else go to on step 7
  7. Display “sum”
  8. average = sum/count
  9. Display “average”
  10. Stop

Explanation:

Algorithm to calculate the average of numbers is

  1. Start
  2. sum = 0, i = 1, average, count = 0
  3.  if i / 2 == 0 then go to step 4, else go to on step 5
  4.  sum = sum + i, count = count + 1
  5.  i = i + 1
  6. if i <= 50 then go to on step 3, else go to on step 7
  7. Display “sum”
  8. average = sum/count
  9. Display “average”
  10. Stop

Otras preguntas

ACCESS MORE