Below is a program that will copy the data (numbers) of one file to another new file. It requests the name of each file. It works fine. I am now trying to copy over to the new file--only one of each number--in other words I want to eliminate repeated numbers. If my source file consists of these numbers: 1, 5, 7, 7, 8, 9, 9, 9, 22, 34 -9sentinel I only want to copy over the 1, 5, 7, 8, 9, 22, and 34. (The -9 is taken care of)
Can anyone lead me in the right direction on how I can solve this problem to get rid of repeated numbers?
One other question: Are my Exceptions satisfactory or is there a better way to incorporate them?