Zebra0.com

cpp arraysFind the day of the year

Find the day of the year

This program finds the day of the year by adding together the number of days in each previous month. It uses several functions: A function to get the date, a function to determine if it is leap year, and another function to calculate the Julian date. The Julian date is the day of the year: January 1st is the 1st day; February 1st is the 32nd day. The date is checked for valid year, month and day.