Saturday, March 3, 2012

Program to accept a year and check whether the given year IS leap year or not.

No comments
/*It is complied on Turbo C++ 3.0*/
# include <stdio.h>
# include <conio.h>
        void main( )
             {
                 int year;

                 clrscr( );
                 printf(“Enter a year:”);
                 scanf(“%d”,&year);
                 if(year%4==0& &year%100!=0|| year%400==0);
                 printf(“The above given year IS a leap year”);
                 else
                 printf(“The above given year IS not a leap year”);
                 getch();
            }

0 comments:

Post a Comment

Entries RSS Comments RSS

Sample Text

Pages


Copyright © Lovely Codes
Powered by Blogger
Distributed By Free Blogger Templates | Design by N.Design Studio
Blogger Theme by Lasantha - PremiumBloggerTemplates.com