Search Java Programs

Tuesday, January 19, 2010

Checking whether a year is leap or not

Here is the code of program:
class  Leapyear
{
public static void main(String[] args)
{
int n=2000;
if (n%4==0){
System.out.println("The given year is a leap year");
}
else{
System.out.println("This is not a leap year");
}
}
}
Download the program:

No comments:

Post a Comment

Website Design by Mayuri Multimedia