Thursday, 19 July 2018

Leap year or Not?

===========================================================================
                                CODING



#include<iostream.h>
#include<conio.h>
#include<math.h>

void main()
{
clrscr();
int a,b;
cout<<"\n Enter any year: ";
cin>>a;
b=a%4;
if(b==0)
{
cout<<"\n The year is leap year!!";}
else
{
cout<<"\n The year is not a leap year";}
getch();
}

===========================================================================


                                OUTPUT


No comments:

Post a Comment