/* File: leapyear.c Determine if a year input from the terminal is a leap year */ #include int main() { int year; /* year (input from the user) */ /* prompt the user for input */ printf("Please input a year\n"); scanf("%d", &year); /* determine if the year is a leap year or not, and display the output */ if(year%4 == 0 && year%100 != 0 || year%400 == 0) printf("%d is a leap year.\n", year); else printf("%d is not a leap year.\n", year); return 0; }