Write a Program to find out leap year
//This program is to find out leap year
#include<stdio.h>
main()
{
int a;
printf("Enter the year to be checked \n");
scanf("%d",&a);
if(a%100!=0 && a%4==0 || a%400==0)
printf("%d is a leap year \n",a);
else
printf("%d is not a leap year \n",a);
}
/*
INPUT:
Enter the year to be checked
2018
OUTPUT:
2018 is not a leap year
*/
Comments
Post a Comment