Search Java Programs

Tuesday, January 19, 2010

Listing out leap years between certain period

Here is the code of the program:
class leapyears
{
public static void main(String[] args)
{
int i=2006;
int n;
for (n=1990; n<=i ; n++){
int l=n%4;
if (l==0){
System.out.println("leap year: "+n);
}
}
}
}
Download this program.

No comments:

Post a Comment

Website Design by Mayuri Multimedia