ch 9/e5.c
//Function to determine last day of the month

Function to determine last day of the month
Function to determine last day of the month
int numberOfDays ( struct date d )
	{
		bool isLeapYear ( struct date d ) ;
		const int last_date [ 12 ] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } ;
		if ( isLeapYear ( d ) && d.month == 2 )
			{
				int feb = 29 ;
				return feb ;
			}
		else
			return last_date [ d.month - 1 ] ;
	}
int numberOfDays ( struct date d ) { bool isLeapYear ( struct date d ) ; const int last_date [ 12 ] = { 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 } ; if ( isLeapYear ( d ) && d . month == 2 ) { int feb = 29 ; return feb ; } else return last_date [ d . month - 1 ] ; }
Function to determine last day of the month
Function to determine last day of the month
//Function decalaration
 //Array containing last date of the 12 months 
 //If it's a leap year and the argument month is Feb
 //The month is not Feb		
