Slight improvement on using enumerations as this makes the code slightly self defining.
Code:
#include <stdio.h>
int main()
{
int year, month;
enum months{January = 1, February, March};
printf("Enter year and month:");
scanf("%d %d", &year, &month);
if (((year%4==0 )&& (year%100!=0)) || ((year%400==0) && (year%100==0)&& (year%4==0)))
{
printf("has three hundred and sixty six (366) days\n");
}
else
{
printf("has three hundred and sixty five (365) days\n");
}
if (month == January)
printf("Janurary has 31 days");
else if (month == February)
printf("February has 28 days");
else if (month == March)
printf("March has 30 days");
return 0;
}