Originally Posted by
beta3designs
I think you still have the duplicated asking for student's ID...
Ok, let's see... If you ask for an ID let's say you enter '1' then you finish entering the marks and it asks you to enter an ID (with the press 0 to exit) and you enter '2' but then it asks again (without the press 0) and you input '3' then you'll be entering the marks for student '3' not your first selection '2'...
You only need to ask once! Not at the start and at the end... you should only ask at the start ;)
EDIT: Bold should be after the validation loop and I didn't notice that you were modifying the values inside of it and maybe my tests didn't affect the values but I can see that's solved now :P