6/2/21

C Program to Find that Given Year is a Leap Year Or Not.

Program to Find that Given Input is a Leap Year Or Not.

#include<stdio.h>
void main ()
{
int y;
printf ("Enter Any Year ");
scanf("%d",&y);
if (y%4==0)
    if (y%100==0)
        if (y%400==0)
            printf("Leap Year");
        else
        printf("Not Leap year");
    else
    printf("Leap Year");
else
printf("Not Leap Year");
getch();
}

Output:- 




0 comments:

Post a Comment

Like us on facebook

blogger templatesblogger widgets

Follow on Twitter

Linkedin

Categories

Mad About Computer. Powered by Blogger.