Given a year how can i find mounths with 5 sundays in it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robin Sakoda
    New Member
    • Dec 2010
    • 1

    #1

    Given a year how can i find mounths with 5 sundays in it?

    Given a year how can i find mounths with 5 sundays in it?

    Example input:2011
    output:jan n feb
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Math and common sense suggests that there are only 14 scenarios. 7 for non-leap years and 7 for leap years. Each one based on what day of the week a year starts on. Further analysis may consolidate some scenarios or reveal a pattern. It's time for you to get out a calendar.

    Comment

    Working...