Write a program to create a calender of 2013
# include<iostream.h>
#include<conio.h>
void main()
{
int mt,date;
clrscr();
cout<<"\n The year is 2013";
cout<<"\n Enter the month: ";
cin>>mt;
if(mt==1||mt==10)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Sunday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Monday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Tuesday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Wednesday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Thursday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Friday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Saturday";
}
}
else if(mt==2)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Wednesday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Thursday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Friday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Saturday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Sunday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Monday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Tuesday";
}
}
else if(mt==3 || mt==11)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Wednesday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Thursday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Friday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Saturday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Sunday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Mondayday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Tuesday";
}
}
else if(mt==5)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Monday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Tuesday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Wednesday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Thursday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Friday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Saturday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Sunday";
}
}
else if(mt==4)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Saturday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Sunday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Monday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Tuesday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Wednesday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Thursday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Friday";
}
}
else if(mt==6)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Thursday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Friday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Saturday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Sunday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Monday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Tuesday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Wednesday";
}
}
else if(mt==8)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Tuesday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Wednesday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Thursday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Friday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Saturday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Sunday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Monday";
}
}
else if(mt==9 || mt==12)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Friday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Saturday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Sunday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Monday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Tuesday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Wednesday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Thursday";
}
}
getch();
}
#include<conio.h>
void main()
{
int mt,date;
clrscr();
cout<<"\n The year is 2013";
cout<<"\n Enter the month: ";
cin>>mt;
if(mt==1||mt==10)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Sunday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Monday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Tuesday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Wednesday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Thursday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Friday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Saturday";
}
}
else if(mt==2)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Wednesday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Thursday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Friday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Saturday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Sunday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Monday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Tuesday";
}
}
else if(mt==3 || mt==11)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Wednesday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Thursday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Friday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Saturday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Sunday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Mondayday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Tuesday";
}
}
else if(mt==5)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Monday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Tuesday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Wednesday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Thursday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Friday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Saturday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Sunday";
}
}
else if(mt==4)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Saturday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Sunday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Monday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Tuesday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Wednesday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Thursday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Friday";
}
}
else if(mt==6)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Thursday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Friday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Saturday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Sunday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Monday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Tuesday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Wednesday";
}
}
else if(mt==8)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Tuesday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Wednesday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Thursday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Friday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Saturday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Sunday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Monday";
}
}
else if(mt==9 || mt==12)
{
cout<<"\n Enter the date: ";
cin>>date;
if(date==6 || date==13 || date== 20 || date==27)
{
cout<<"\n Friday";
}
else if(date==7 || date==14 || date==21 || date==28)
{
cout<<"\n Saturday";
}
else if(date==1 || date==8 || date==15 || date==22 || date==29)
{
cout<<"\n Sunday";
}
else if(date==2 || date==9 || date==16 || date==23 || date==30)
{
cout<<"\n Monday";
}
else if(date==3 || date==10 || date==17 || date==24 || date==31)
{
cout<<"\n Tuesday";
}
else if(date==4 || date==11 || date==18 || date==25)
{
cout<<"\n Wednesday";
}
else if(date==5 || date==12 || date==19 || date==26)
{
cout<<"\n Thursday";
}
}
getch();
}
No comments:
Post a Comment