Interview Question: Leap of Code

Sample Question #60 (programming)

In your favorite programming language, write a function that takes today’s date in the YYYYMMDD format and returns whether the year is a leap year.

Advertisements
This entry was posted in Sample Qs. Bookmark the permalink.

One Response to Interview Question: Leap of Code

  1. Brett says:

    ANSWER
     
    A leap year is a year that is divisible by 4, except if the year ends in 00, it must be divisible by 400.
     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s