this program takes in 10 students or less but when you enter less then 10 it seem that the loop keeps going and gets random junk from memory can anyone help me out here.. point me in the right direction. thank you.... and thank you if you help me with my last problem with this program...
You array is a constant size 10, so it will always have 10 students, even if the user only fills out less. The minimal change solution would probably be to add another variable that indicates the number of students that were actually entered and only loop until that instead of the full size of the array.