I ran into the same problems when inputting values, however that was with binary mode on. It should be pretty easy to debug this code as it is writing as text, you can check the output with each section of the code.
Also are you trying to empty the text file and write this data, append to end of file, etc?
And have you gone inFile.close() to write the data from buffer into file.\
--
I do see some errors in your logic, they may not cause bugs, but they are redundant pieces of code, etc:
if (sales < A) // Bob
{
}
else if (sales >=A && sales < B) //A would have to already be == or >= A
{