C program to display month by month calendar for a given year. Given a year N , the task is to print the calendar for every month of the given year.
using this formula to find the the last weekday
int get_1st_weekday(int year){ int d; d = (((year-1)*365)+((year-1)/4)-((year-1)/100)+((year)/400)+1)%7; return d; }
using this formula to find the year is a leap year or not
if((year%4==0 && year%100!=0)||(year%400==0))