Write a C program to find the given year is a leap year or not.
Program:
#include <stdio.h>
int main()
{
int year;
printf("enter a year:");
scanf("%d",&year);
if(year%4==0)
printf("it is leap year.");
else{
printf("its not a leap year.");
}
}
Output 1:
Comments
Post a Comment