Question: modify this in C so that it follows the instructions and works. 1 2 3 4 4 /* Months 4, 6, 9 and 11 have

modify this in C so that it follows the instructions and works.

modify this in C so that it follows the instructions and works.1 2 3 4 4 /* Months 4, 6, 9 and 11

1 2 3 4 4 /* Months 4, 6, 9 and 11 have 30 days, Months 1, 3, 5, 7, 8, 10 and 12 have 31 days*/ /* Month 2 usually has 28 days except when it is leap year*/ /* Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100 */ /* But these centurial years are leap years if they are exactly divisible by 400 */ /* For example, the years 1700, 1800, and 1990 were not leap years, but the years 1600 and 2000 were /* Based on these facts, evaluate the eneterd day, month, year is valid or invalid year/month/day Total no. of bugs: 20 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include int main() { int birthmo; int birthDay; int birthYr; const int HIGHMO - 12: const int HIDAY1 = 31; const int HIDAY2 = 30; const int HIDAY3 = 29; const int HIDAY4 = 28; const int LOYEAR = 1885; const int HIYEAR = 2019; printf("Enter your birth month "); scanf("%s", birthMo) printf("Enter your birth day "); scanf("%p", birthDay) printf("Enter your birth year "); scanf("x", birthyr) 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 if(birthyr = HIGHMO) { printf( "Invalid month "); }else if(birthMo == 2 && (birthYr&4 == 0 && birthyr 10 != 0 || birthYr4400 == 0)) { if(birthDay >= HIDAY1 ) { printf( "Valid day ") Jelse{ printf( "Invalid day for month in @p " birthMo birthyr ) } 44 45 }else if(birthMo == 2) { if(birthDay >= HIDAY3) { printf( "Valid day ") }else printf( "Invalid day for month in %p " birthMo birthyr ) } }else if (birthMo = HIDAY1) { printf("Valid day" ); Jelse{ printf( "Invalid day for month $d ", &birthmo) } }else if{ if(birthDay & HIDAY2) { printf("Valid day ") }else{ printf("Invalid day for month in $c " birthMonth birthyr ); } } return '0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!