0
379views
Write a program to read a year as an input and find whether it is a LEAP YEAR or not.
1 Answer
written 2.6 years ago by | • modified 2.6 years ago |
Program
#include <stdio.h>
#include<conio.h>
void main()
{
int year;
printf("Enter the Year:");
scanf("%d",&year);
if(year%4==0 && year%100!=0 || year%100==0 && year%400 ==0)
printf("Leap Year");
else
printf("Not a Leap Year");
}