C Program to accept a year & check whether the given year IS leap year or not

CWC
0 Min Read

C Program to accept a year & check whether the given year IS leap year or not

# include <stdio.h>
# include <conio.h>
main( )
{
int y;
clrscr( );
printf(“enter a year:”);
scanf(“%d”,&y);
if(y%4==0& &y%100!=0|| y%400==0);
printf(“the above given year IS a leap year”);
else
printf(“the above given year IS not a leap year”);
getch();
}

 

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version