#include #include #include #define MIN_GREGYR 1582 int main (void) { int year; printf("Enter year:\n"); scanf("%lf", &year); if (year <= MIN_GREGYR) { printf("Error: Gregorian Calendar not adopted at this time.\n"); } else { if ((year%4 != 0) || (year%100 == 0 && year%400 != 0)) printf("%d is not a leap year.", year); else printf("%d is a leap year!", year); } system ("PAUSE"); return 0; }