c program for find leap year using c

#include<stdio.h>
int main()
{
  int year;
  printf("enter year");
  scanf("%d",&year);
  if(year%100!=0)
  {
   
      if(year%4==0||year%400==0)
     {
        printf("leap year");
     }
     else
     {
      printf("not leap year");
     }
  
   }
}

Comments

Popular posts from this blog

BYTE STUFFING PROGRAM USING C

Rotate a matrix 270 degree AntiClockWise

Finding the length of connected cells of 1's (regions) in an matrix of 1's and 0's