#include<iostream.h>
#include<conio.h>
void main()
{
                int year;
                clrscr();
                cout<<"Enter The Year :- ";
                cin>>year;
                cout<<"\n\t";
                if(year%100!=0)
                                {
                                if(year%4==0)
                                                {
                                                cout<<year<<" Is Leap ";
                                                }
                                else
                                                {
                                                cout<<year<<" Is Not Leap ";
                                                }
                                }
                else
                                {
                                if(year%400==0)
                                                {
                                                cout<<year<<" Is Leap ";
                                                }
                                else
                                                {
                                                cout<<year<<" Is Not Leap ";
                                                }
                                }
                getch();
}

20

Advertisements