CODE How to check the year is leap year or not? int main() { int y; printf("\n enter an year:"); scanf("%i",&y); if((y%4==0&&y%100!=0)||(y%400==0)) printf("\n the year is a leap year"); else printf("\n the year is not a leap year"); } Output: enter an year: 2000 the year is a leap year
No comments:
If you have any doubt or query ,comment below: