Q:

Calculate Leap Year Using Java

0

This Program is used to calculate Leap year using Java.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.io.*; 
import java.lang.*; 

class ssva23 
{ 
public static void main(String arg[])throws IOException 
{ 
BufferedReader obj=new BufferedReader(new InputStreamReader(System.in)); 
System.out.println("\n LEAP YEAR"); 
System.out.println(" ---- ----"); 
System.out.print("\nENTER THE YEAR : "); 
int year=Integer.parseInt(obj.readLine()); 
if(year%4==0) 
{ 
System.out.println("\nTHE GIVEN YEAR IS LEAP YEAR"); 
} 
else 
{ 
System.out.println("\nTHE GIVEN YEAR IS NOT LEAP YEAR"); 
System.out.println("\n"); 
} 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now