hey, i was suppose that (day)1/(month)1/(year)1 it was satrday,and counter =0;
for(int i=1;i<year;i++){
if year is leap conter+=2;
else counter++;
}
counter %= 7;
and after that the counter will represent the days of weak from (0 -> 6)
there is cases goes right but there is wrong too is my thinking is wrong ??
Last edited on
What is the calendar algorithm
1(str),2(sun),3(mon) and so on. that's what i mean, it's work on some cases but wrong on the other i don't know why that give me wrong answer ?!
what greenleaf800073 said, you should post the algorithm