14-Write a C program to find that it is leap year or not.

Program: 14

Write a C program to find that it is leap year or not.

#include
#include
void main()
{
    int y;
    printf("Enter a year: ");
    scanf("%d", &y);
    if(y%4==0)
    {
        printf("%d is leap year.", y);
    }
    else
        printf("%d is not a leap year.", y);
    getch();
}
Output
Enter a year: 2016

2016 is leap year.

Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Related Post
Leave a Comment

This website uses cookies.