Stoned;

I inserted the code into the main body of the program, overwriting mine, then ran it, and I got the same result. The output looks like:

Current Previous
August July

This is if I entered 8. So it is running with the exception of printing the remaining months such as:

Current Previous
August July
September August
October September

and so on through the rest of the months.