Ending code

I am writing a code for that allows a teacher to enter assignment score for each student and then find the minimum, maximum, or average score for each assignment. But when the user terminates the program I have to make it save the information to a disk and inform the user of the filename. I have no idea how to do that any help would be greatly appreciated.
Topic archived. No new replies allowed.