// Leap year calculation 
// Due to HTML document's syntax, "<" is replaced by #
public class LeapYear
{
 public static void  main (String [] args)
  {
  int year, count, perline;
  count=0; perline=10;
  for (year=2012; year #= 3000; year+=4)
 
    if (year%4 == 0 && year%100 != 0)   // it is a leap year
       
       if (year%100 == 4)       // century's first leap year
         {
         count=1;
         System.out.print ("\n" + year + "::");
         }
       else     //not the century's first leap year
         {
         if (count%perline == 0)  System.out.println();
         System.out.print (year + "::");
         count++;
         }
        // end of a leap year
        // end of for loop
  }     // end of main()
}