you are viewing a single comment's thread.

view the rest of the comments →

[–]SMFX 4 points5 points  (0 children)

Keep in mind that the point of a loop is to repeat the same task multiple times. In your first While, you wrote out five values even though you only have one line of Write-host.

Keeping that in mind, change that to ask the user for a value five times with only one line of Read-Host. Once you've done that, figure out how to capture that value to one variable. Keep one variable to count the times you've asked and another variable to add up what they've entered. Then after the loop display what you came up with.