Originally Posted by
Salem
Not to mention, the unindented code which is simply awful to look at.
Second that. Also, flow of the code is confusing which is really awful considering the simplicity of the problem.
main returns an integer. So it's
int main() not just
main(void) .
This test condition is wrong:
You aren't checking for leap years, although at one point you do find
i=y%4; . Comparing this value with the number of days screws up the whole thing.