Tuesday, February 18

Finding Leap Year in Java



Hi ALL,

Here I wrote a program for Finding Leap Year in java.



/**
 *
 * @author Balamurgan M
 */
import java.util.Scanner;

public class LeapYear {
public static void main(String arg[]){
    System.out.println("Plase enter the year");
    Scanner in=new Scanner(System.in);
    int year=in.nextInt();
    if((((year%4)==0)&&(year%100)!=0)||(year%400)==0)
       System.out.println("It is leap year "+year);
    else
        System.out.println(" It is not a Leap Year "+year);
}   
}

No comments:

Post a Comment

Backup files to google drive using PHP coding

 Dear All, To backup files to Google Drive using PHP coding, you can use the Google Drive API and the Google Client Library for PHP. Here...