C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>
int main()
{
long int TotalDays;
int year, month, date,day;
int i;
int nMonth[13];
nMonth[0]=0;
nMonth[1]=31; nMonth[2]=28; nMonth[3]=31; nMonth[4]=30;
nMonth[5]=31; nMonth[6]=30; nMonth[7]=31; nMonth[8]=31;
nMonth[9]=30; nMonth[10]=31; nMonth[11]=30; nMonth[12]=31;
printf("Input year : \n");
scanf("%d",&year);
printf("Input month : \n");
scanf("%d",&month);
TotalDays=(year-1)*365+(year-1)/4-(year-1)/100+(year-1)/400;
for(i=1;i<month;i++)
{
TotalDays=TotalDays+nMonth[i];
}
for(date=1;date<=nMonth[month];date++)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run