// let me know if this is ryt plz.
// its really important, thnx guys..
import javax.swing.*;
public class Leap_Year
{
public static void main( String[] args)
{
string year;
int yearNumeric;
year = JOptionPane.showInputDialog(null, "Enter Any Year: ");
yearNumeric = Integer.parseInt(year);
System.out.println(yearNumeric);
if (yearNumeric/4 && yearNumeric!/100)
{
System.out.println ("This is a leap year.");
}
else
{
System.out.println("This is not a leap year.");
}
else if (yearNumeric/4 && yearNumeric/100 && yearNumeric/400)
{
System.out.println ("This is a leap year.");
}
else
{
System.out.println("This is a Leap Year.");
}
}
}
2007-08-31
22:14:30
·
3 answers
·
asked by
agam
1
in
Computers & Internet
➔ Programming & Design