{ A destination to learn coding }

Leap Year Code


#include<stdio.h>

int main()
{
  int a;
  printf("Enter the year\n");
  scanf("%d",&a);

  if(a%4==0)
  {
    if(a%100==0)
    {
      if(a%400==0)
      printf("Leap year\n");

      else
      printf("Not a Leap Year");
    }

    else
    printf("Leap year\n");

  }

  else
  printf("Not a leap year\n");
 
  return 0;
}