I'm writing a program that reads a list of sales prices and then outputs them along with the highest and second highest sales along with how many times they occurred.
I am having trouble with finding and counting the highest and second highest sales. I am in a beginner course so I cannot use anything too advanced. Also, the file should be read through only once.
I would correct you on the errors in comparison used at lines #36 and #45.
Use '==', which is the comparison operator. '=' is the assignment operator, which assigns the right hand side value to the left hand side variable.
By the way, try getting the habit of commenting on your program (use // or /* */ to do so). I also used to not do this, but it makes it a lot easier for others to read your program (or for yourself if you want to modify it after a year or so) :)
And also, to make it easier for yourself you should try to use tabs (which I think are done automaticaly by a lot of programs)