Tuesday, 10 May 2011


Java Program to find Leap Years between Certain Period


Code:
/*Java Program to find Leap Years between Certain Period*/
class leapyears
{
  public static void main(int year)
  {
    int n;
    for (n=1990; n<=year ; n++){
      int l=n%4;
      if (l==0){
        System.out.println("leap year: "+n);
      }
    }
  }
}

Comment below for your Query and Feedback... :)

Related Posts :



0 comments:

Confused? Feel free to ask

Post a Comment