write a program that prints out a calendar for a full year between 1900-2500 Jan
ID: 3635435 • Letter: W
Question
write a program that prints out a calendar for a full year between 1900-2500January 1994
Su Mo Tu We Th Fr Sa
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 29
30 31
void greetings()
printf("Cal assignment");
int getYear()
int y
printf(" enter between 1900 and 2500 ");
scanf("%d, &y);
if(y>=1900 && (y<=2500)
return y;
else
exit(1);
int printCalendar1()
this function is supposed to be for the leap year
int printCalendar2()
(this function is supposed to be for the normal year
Explanation / Answer
Calendar Program #include int day(int m1,int y1) { int d; if(m1==1 || m1==3 || m1==5 || m1==7 || m1==8 || m1==10 || m1==12) d=31; else if(m1==4 || m1==6 || m1==9 || m1==11) d=30; else if((y1%100!=0 && y1%4==0) || y1%400==0) d=29; else d=28; return d; } void main() { long unsigned int t; unsigned int y,y1,m,m1,d,da,i,j,k; char a[12][20]={"January","February","March","April","May","June","July","Augus t","September","October","November","December"}; clrscr(); textcolor(CYAN); cprintf("Enter the year: "); scanf("%4u",&y); if(yRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.