Answer:
Logic for a program
Explanation:
//Here ind = index
//declare the number
number ind
number sum
number avg
number SIZE = 20
number num[SIZE] = {0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0}
getReady()
while ind < SIZE
getNumbers()
stop
getReady()
ind = 0
sum = 0
return
getNumbers()
cout<< “Enter a number for position ”, ind
input numbers[ind]
sum = sum + numbers[ind]
ind = ind + 1
return
;
finishUp()
avg = sum/SIZE
ind = 0
while ind < SIZE
output numbers[ind], avg – numbers[index]
ind = ind + 1
return
Modify the program in 2a
number index
number sum
number avg
number actualSize
number SIZE = 10
number number[SIZE] = 0