C Program For Finding That A Given Year Is Leap Or Not

Leave a Comment
#include<stdio.h>
#include<conio.h>
int main()
{
int y;
printf("Enter the year you wanna check:");
scanf("%d", &y);
if(((y%100==0)&&(y%400==0))||((y%100!=0)&&(y%4==0)))
printf("\nThe entered year is a leap year!");
else
printf("\nThe entered year is not a leap year!");
getche();
}

0 comments: