Computer Science
I need help with this problem. I don't know how to set it up correctly.
Input a list of positive numbers (terminated by 0)into an array, and output the result. Use a subprogram to output the numbers, a function to find the mean, an a subprogram to output the result. I know you have to have a main module, subprogram module, a function module, and a subprogram output module, but I don't know what should be put in any of them and the order they should be put in. Any help would be appreciated.

The main should declare and load the list structure (or object), and also a variable to hold the result.
The list structure cannot be fixed length; it needs to grow arbitrarily long.
You'll also need a way to input numbers into the list. Given your modular design, this should also be a subprogram.
The main should then send this list to the function module and retrieve the result.
The list should be sent to a second subprogram for output.
The result should be sent to a third subprogram for output.
Pseudocode:
main()
declare *aList
declare aMean
call subInputList(&aList)
let aMean = funCalculateMean(&aList)
call subOutputList(&aList)
call subOutputMean(aMean)
endposted by Graham
Respond to this Question
Similar Questions

computer science
Input a list of positive numbers (terminated by 0) into an array, find the mean (average) of the numbers in the array, and output the result. Use a subprogram to input the numbers, a function to find the mean, and a subprogram to 
computer programming
Input a list of positive numbers (terminated by 0) into an array, find the mean (average) of the numbers in the array, and output the result. Use a subprogram to input the numbers, a function to find the mean, and a subprogram to 
programming
Input a list of positive numbers (terminated by 0) into an array, find the mean (average) of the numbers in the array, and output the results. Use a subprogram to input the numbers, a function to find the mean, and a subprogram to 
programming Please respond
input a list of positive numbers terminated by 0 into a array. find the mean of the numbers in the array and output the result. use a subprogram to input numbers a function to find the mean and a subprogram to output the result. 
Programming
Input a list of positive numbers (terminated by 0) into an array, find the mean (average) of the numbers in the array, and output the result. Use a subprogram to input the numbers, a function to find the mean, and a subprogram to 
programming
input a list of positive numbers terminated by 0 into a array. find the mean of the numbers in the array and output the result. use a subprogram to input numbers a function to find the mean and a subprogram to output the result. 
programming concepts
Input a list of positive numbers ( terminated by 0) into an array, find the mean ( average) of the numbers in the array, and output the result. Use a subprogram to input the numbers, a function to find the mean, and a subprogram 
COP 20006
show an example of an user inputs a list of positive numbers terminated by 0 into an array, find the mean of the numbers in the array, and outputs th result. use a subprogram to input the numbers, a function to find the mean, and 
Programming
Input a list of positive numbers (terminated by 0) into array, find the largest number in the array, and output the result. Use a subprogram to input the numbers, a function to find the largest, and a subprogram to output the 
Math
Input a list of positive numbers (terminated by 0) into an array find the mean (average) of the numbers in the array and output the results. Use a subprogram to input the numbers, a function to find the mean and a subprogram to