#include <stdio.h> void main() { int year ; printf("Enter a year : "); scanf("%d" , &year); if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) { printf("%d is a leap year\n" , year); } else { printf("%d is not a leap year\n" , year); } }
Subscribe for more such posts..
Dear Reader...
I hope u are like my posts. If so then please don't forget to like , share and follow my blog for more such posts ,also feel free to write suggestions in the comment box given over here.
Thank you...
I hope u are like my posts. If so then please don't forget to like , share and follow my blog for more such posts ,also feel free to write suggestions in the comment box given over here.
Thank you...
Search This Blog
C program to find whether the given year is a Leap year or not.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment