Professional Documents
Culture Documents
#include<iostream>
#include<conio.h>
#include <ctime>
#include<Windows.h>
int j;
void Start_up()
system("cls");
class calender
private:
int date, month,year;
public:
date = d;
month = m;
year = y;
};
bool Leap;
Leap = true;
else
Leap = false;
return Leap;
switch (m)
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 2: if (leapyear(y))
return 29;
else
return 28;
int i;
int dow = 6;
start with 6
dow += (leapyear(i)) ? 2 : 1;
dow+=364;
dow += d;
return dow;
void calender::day(int a)
{
switch (a)
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 0:
break;
default:
int j, mon, c;
j = 0;
for (j = 0; j <= 6; j++) // For printing 7 days of week
day(j);
j = 1;
c=c%7;
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
}
mon = DaysInMonth(month, year);
c++;
if (!(c % 7))
int main()
int x,y,z;
system("color 5f");
// Start_up();
do
system("cls"); // clrscr();
heading(t, 79);
heading(t, 79);
cout << "\nEnter 1 for knowing the day of a specific date\nEnter 2 to view the
cin >> i;
if (i == 1) //OPTION 1
{
cout << "\nPlease provide valid date.\t Press any key";
getch();
system("cls");
main();
month:
getch();
goto month;
year:
cout << "\nPlease enter year within given range (1700 - 2400 ).\t Press any
key";
getch();
goto year;
cout << "\n" << ++date << "/" << month << "/" << year << " is ";
i=i%7;
else if (i == 2) //OPTION 2
{
month2:
getch();
goto month2;
year2:
cout << "\nPlease enter year within given range (1700 - 2400 ).\t Press any
key";
getch();
goto year2;
calender obj;
obj.monthcal(month, year);
else if (i == 3)
system("cls");
main();
month3:
getch();
goto month3;
year3:
cout << "\nPlease enter year within given range (1900 - 2014 ).\t Press any
key";
getch();
goto year3;
long int p;
long int q;
ch = _getch();
return 0;