+ 1
C++ program to calculate the number of Sundays in a year .
The program has to calculate the no. of times a particular day (eg. Sunday/Monday/Tuesday) occurs in a given year.
1 Answer
+ 1
If year starts on the day or it's a leap year and it's second day is that day, 53, otherwise 52.
If you need to list them, find the first one by finding which day the first of the year is and adding how ever many days are needed to get there. Add 7 days to find the next one and repeat until you reach the following year.