Showing posts with label Sample Code to check whether the year is leap or not in C. Show all posts
Showing posts with label Sample Code to check whether the year is leap or not in C. Show all posts

Thursday, May 3, 2012

Write a program to check whether the year is leap or not


/*****<soeasyprograms.blogspot.in>*****/
#include <iostream.h>
#include <conio.h>
void main ()
{
int y;
clrscr ();
cout <<"Enter Year: ";
cin >>y;
if (y%4==0)
{
cout <<"Year is Leap";
}
else
{
cout <<"Year is not Leap";
}
getch ();
}


Output of this program is:
Dont forget to give comments