1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
void printmonth (const int month, const int startday, const bool leap)
{ int daysinmonth[13]= {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
cout << endl;
cout<< setw(14) << Months[month] << endl ;
cout << " Sun Mon Tue Wed Thu Fri Sat " << endl;
for (int i=1; i<=daysinmonth[month]; i++)
cout << setw(4) << i;
if(leap) daysinmonth[2]=29;
}
|