C - A1P7 - Leap year






/* Enter the Year and check whether it is Leap year or Not */

#include<stdio.h>
#include<conio.h>
void main()
{
    int year;
    clrscr();
    printf("Enter Year -> ");
    scanf("%4d",&year);

    if(year%4==0)
    {
        printf("\n\n%d is a Leap Year",year);
    }
    else
    {
        printf("\n\n%d is Not a Leap Year",year);
    }
    getch();
}

Post a Comment