c program for find leap year using c
#include<stdio.h>
int main()
{
int year;
printf("enter year");
scanf("%d",&year);
if(year%100!=0)
{
if(year%4==0||year%400==0)
{
printf("leap year");
}
else
{
printf("not leap year");
}
}
}
int main()
{
int year;
printf("enter year");
scanf("%d",&year);
if(year%100!=0)
{
if(year%4==0||year%400==0)
{
printf("leap year");
}
else
{
printf("not leap year");
}
}
}
Comments
Post a Comment