Ads Top

CHECK WHETHER THE YEAR IS LEAP OR NOT USING C

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
cout<<Enter the year";
IT Park @ Campus



cin>>a;
textcolor(2+BLINK);
textbackground(15)
if(a % 4==0)
ccout("THE YEAR IS LEAP YEAR");
else
ccout("THE YEAR IS NOT LEAP YEAR");
getch();

}


OUTPUT:
Enter the year:
2008
The year is leap year.
2011
The year is not leap year.


No comments:

Touchfeeds. Powered by Blogger.