View Single Post
Join Date: Sep 2008
Posts: 146
Reputation: devnar will become famous soon enough devnar will become famous soon enough 
Solved Threads: 16
devnar's Avatar
devnar devnar is offline Offline
Junior Poster

Re: need urgent responce please!

 
0
  #6
Dec 2nd, 2008
Originally Posted by Salem View Post
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:
  1. else if(d==i&&m==2)

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.
Reply With Quote