Year is completely divisible by 4, 100, 400 then called that year is leap year.
// check given year is leap year
#include<stdio.h>
int main(){
int year;
printf("Enter the year : ");
scanf("%d", &year);
if(year%4==0 || year%400==0 || year%100==0){
printf("%d this year is leap year", year);
}else{
printf("%d this year is not leap year", year);
}
return 0;
}
Comments
Oops!