I think you need another ending bracket for the for loop.
MatEpp
Junior Poster in Training
79 posts since Jan 2009
Reputation Points: 21
Solved Threads: 12
I have not seen your code thoroghly but the immediate thing I would like to point out it this:
if (a = months+12){
as you may see you have used a = rather than ==. In c++( and even in C) = will always evaluate true. To test for a condition == should be used.
So change it too ==.
siddhant3s
Practically a Posting Shark
816 posts since Oct 2007
Reputation Points: 1,486
Solved Threads: 140
>>I originally wanted it to stop after every 12 lines of output
Your condition is wrong.
Basically you want to stop at every multiple of 12. that is when a is 12,24,36...
That is a divided by 12 should yield no remainder.
So change your condiditon to :
if(a %12==0)
siddhant3s
Practically a Posting Shark
816 posts since Oct 2007
Reputation Points: 1,486
Solved Threads: 140