Praveen | Typing Speed Test is a very useful Software available for free Download.

C Programs to Check Year is Leap Year Or Not

      In this C program to check leap year or not by the user enter. Leap year means, year to divided by 400, or 200, or 4 then remaining is zero those year is leap year.


C programming code

#include<stdio.h>
#include<conio.h>


void main()
{
      int year;
      clrscr();
      printf("\n Enter the year ");
      scanf("%d", &year);
      if ( year%400 == 0 || year%100 == 0 || year%4 == 0 )
         printf("\n %d is a leap year.", year);
      else
         printf("\n %d is not a leap year.", year);  
      getch();
}


Output:-