Thread: leap year

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0

    leap year


    can anyone teach me how to write a source code on calculating wheather a certain year is a leap year or not when a user key in the year that he wants to find out.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    45
    Rep Power
    11
    Originally Posted by BabyXie
    can anyone teach me how to write a source code on calculating wheather a certain year is a leap year or not when a user key in the year that he wants to find out.

    ....who are you writing a program for?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0
    For my friend who is having problem with her source code which cant seems to work...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    45
    Rep Power
    11
    Originally Posted by BabyXie
    For my friend who is having problem with her source code which cant seems to work...
    ok. i just thought it was odd. i am doing that for a class.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    45
    Rep Power
    11
    Originally Posted by BStokes
    ok. i just thought it was odd. i am doing that for a class.
    if you go to yahoo or a search engine and look up "how to determine a leap year" that will tell you but i doubt anybody is willing to just give you the code
  10. #6
  11. No Profile Picture
    Cypher
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    La Jolla, CA
    Posts
    121
    Rep Power
    11
    Originally Posted by BStokes
    if you go to yahoo or a search engine and look up "how to determine a leap year" that will tell you but i doubt anybody is willing to just give you the code
    Exactly. I am pretty disgusted with some of the threads of I read on here over the past few days. I started reading dev shed 4 days ago, and have noticed at least 4-5 posts that seem very contrived. Very similar to things that I've already been asked to do in school, or that just sound like projects. People are so unclear in their questions and they list "Here are my ideas." Which usually just consist of the system calls that the user needs to make to write the program.

    Anyways, I will not give you any code, but here is some general leap year info.

    A leap year falls under one of two conditions.

    1. The year is divisble by 400 it is a leap year.
    2. If a year is divisible by 4 and NOT by 100, it is a leap year.

    Thats it
    -Evan

IMN logo majestic logo threadwatch logo seochat tools logo