Programming contest #3
Coders Lounge - MPGH - MultiPlayer Game Hacking
Could someone explain to me why this is failing?
haven't coded in a long time.
I know I still need to add the 29 of Feb once in 4 years.
Could someone explain to me why this is failing?
haven't coded in a long time.
I know I still need to add the 29 of Feb once in 4 years.
Code:
#include <iostream>
using namespace std;
int main()
{
int days[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int noobcake=5;
int total=0;
int years=0;
for(;years++;years!=100)
{
cout<<years<<"this is never executed";
for(int month=0;month++;month!=12)
{
if(noobcake==6)total=total+1;
noobcake=(noobcake+days[month])%7;
cout<<month;
}
}
cout<<total;
system("pause");
return 0;
}



