试题详情

阅读下列C程序,回答下列问题。 [C程序] int GetMaxDay( int year, intmonth ) { int maxday = 0; //1 if ( month >= 1 && month <= 12 ) { //2,3 if ( month == 2 ) { //4 if ( year % 4 == 0 ) { //5 if ( year % 100 == 0 ) { //6 if ( year % 400 == 0 ) } //7 maxday = 29; //8 else //9 maxday = 28; } else //10 maxday = 29; } else //11 maxday = 28; } else{ //12 if(month==4||month==6||month==9||month==11) //13, 14, 15, 16 maxday = 30; //17 else //18 maxday = 31; } } return maxday; //19 } 1、请针对上述C程序给出满足100%DC(判定覆盖)所需的逻辑条件。