#include <stdio.h> #include <conio.h> main() { int y; printf("\n enter any year"); scanf("%d", &y); if ((y % 4 == 0) && ((y % 100 != 0) || (y % 400 == 0))) printf("\n the year is LEAPYEAR"); else printf("\n the year is NOT LEAPYEAR"); getch(); }
Output: