Mihai Gherghina wrote:Now the catch is that I have to create this program and all of its calculations, along with its data entry in one single for loop.
Actually it says to add all the values and calculate the average in one loop; does that mean you have to calculate the mode in the same loop? I can't think offhand about a simple way to display modes in the one loop, because the modes do not actually exist until the loop has completed. Maybe I am mistaken there, however.
Winston Gutkowski wrote:. . . I also don't see any restriction that says you have to use only one method; just one loop. . . .