vProgram
#include<iostream.h>
#include<conio.h>
void main()
{
int year;
cout<<"Enter
Check Year:";
cin>>year;
if(year%400==0)
{
cout<<year<<"\tLeap
Year:";
}
else
if(year%100==0)
{
cout<<year<<"\t NOT Leap Year:";
}
else
if(year%4==0)
{ cout<<year<<"\tLeap
Year:";
}
else
{ cout<<year<<"\tNOT Leap
Year:";
}
getch();
}
|
vOutput:
Enter Check Year:2016
2016 leap Year
|
No comments:
Post a Comment