#include<stdio.h>
main()
{
int i,j,n,y,d[12]={31,28,31,30,31,30,31,31,30,31,30,31};
char
m[12][5]={"JAN","FEB","MAR","APL","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"};
long nod;
clrscr();
printf("ENTER THE YEAR TO PRINT:");
scanf("%d",&y);
nod=(365L*(y-1)+(y/4));
if(y%4==0) d[1]=29;
n=nod%7+1;
if(y%4==0&&y!=2000) n--;
for(i=0;i<12;i++)
{ clrscr();
printf("\n\t\t\t%s\t%d",m[i],y);
printf("\n\n\tSUN\tMON\tTUE\tWED\tTHR\tFRI\tSAT\n\t");
for(j=1;j<n;j++) printf("\t");
for(j=1;j<=d[i];j++)
{
printf("%d\t",j); n++; if(n>7){
printf("\n\t"); n=1; }
}
getch();
}
}
Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com