question archive Design a modular solution using pseudocode that will ask the user how many numbers they want to enter
Subject:Computer SciencePrice:3.89 Bought28
Design a modular solution using pseudocode that will ask the user how many numbers they want to enter. Enter the input values into an array named Numbers. After the numbers are entered into the array print the numbers from the array, print the sum of the numbers, and locate and print lowest number. Use the array for all processing.
Ensure that the values entered into the array Numbers are in the range of 0 to 10. If the value is not in the range, print an error message.
It is a complete question please write it in Pseudocode
SOLUTION:
Pseudocode:
SET NoOfElements to user input of how many no he needs
SET COUNT =0
CREATE Names array with having size equal to NoOfElements
WHILE COUNT<NoOfElements
SET VALUE to user input value
IF VALUE<=0 AND VALUE>=10
DISPLAY ERROR MESSAGE
ELSE
Names[COUNT] = VALUE ENDIF
INCREMENT COUNT by 1 ENDWHILE
SET SUM to 0
FOR l=0 to array length-1
DISPLAY Names[l]
ADD Names[l] to SUM
ENDFOR
DISPLAY SUM
SET INDEX =0
SET MIN = Names[0]
FOR l=0 to array length-1
IF Names[l]<MIN
MIN = Names[l]
INDEX = l
ENDIF
ENDFOR
DISPLAY INDEX and MIN