Answer:
// program in C.
#include <stdio.h>
// main function
int main()
(y % 400 == 0))
printf("%d is leap year.",y);
else
printf("%d is not a leap year.",y);
return 0;
Step-by-step explanation:
Read year from user and assign it to variable "y".If year is divisible by 4 and not divisible by 100 or year is divisible by 400 then year is leap year otherwise year is not a leap year.
Output:
Enter a year : 2009
2009 is not a leap year.