Check the year is lap or not..

Bismillahir Rahmanir Rahim
Everyone know that what is lap year.
now i'm write a program
how can check the year is lap or not.

#include<stdio.h>
void main()
{
 int y;
 scanf("%d",&y);
 if(y%4==0)
  {
   if(y%100==0)
     {
      if(y%400==0)
 printf("lap year");
      else
 printf("not lap");
      }
   else
     printf("lap year");
  }
 else
   printf("not lpp");
}

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →