#include<stdio.h>
main()
{
int year;
printf("Enter the year you want to check\n");
scanf("%d",&year);
if(year%400==0)
{
printf("%d is leap year\n",year);
}
else if(year%100==0)
{
printf("%d is not a leap year\n",year);
}
else if(year%4==0)
{ printf("%d is a leap year\n",year);
}
else
{ printf("%d is not a leap year\n",year);
}
}
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

Enter the year you want to check 2024 
2024 is a leap year

Logic:
400 then it is leap year(ex: 2000,2400)
100 then it is not a leap year.(ex: 2100 which is divisible by 4 but not with 400)
4 then it is leap year.