A program to display a calendar for any given year that the user puts in.
I need some help to arrange the days of the week in columns and put each of the days according to the days in the week. And also i need a line drawn after the letters of the days of the week.If anyone could,please guide me.
int main()
{
int Y,n,W,C,y,i;
cout << "Enter the year: ";
cin >> Y,n;
if (Y / 4 == 0)
{
if (Y / 100 != 0 || Y / 400 == 0)
{
n = 364;
}
}
else
n = 365;
C = (Y - 1) / 100;
y = (Y - 1) % 100;
W = ((29 - 2 * C + y + y / 4 + C / 4) % 7 + 7) % 7;
cout << Y <<endl ;
cout << "January\n";
cout << "S M T W T F S";
i = 1;
while (i != 32)
{
cout << i;
i++;
}