1: int main()
2: {
3: int year;
4: printf("Enter a year to check if it is a leap year<span style="font-weight: bold;">\n</span>");
5: if ( year%400 == 0)
6: printf("%d is a leap year.", year);
7: else if ( year%100 == 0)
8: printf("%d is not a leap year.", year);
9: else if ( year%4 == 0 )
10: printf("%d is a leap year", year);
11: else
12: printf("%d is not a leap year.", year);
13: return 0;
14: }
getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
Showing posts with label leapyear. Show all posts
Showing posts with label leapyear. Show all posts
Monday, 6 July 2015
Write C Program To Check inputed Number is Leap Year Or Not
Subscribe to:
Posts (Atom)