HOW TO CREATE JAVA PROGRAM TO LEAP YEAR - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
HOW TO CREATE JAVA PROGRAM TO LEAP YEAR

HOW TO CREATE JAVA PROGRAM TO LEAP YEAR

import java.util.Scanner;

class LeapYear
{
public static void main (String[]arr)
{
System.out.println("Please Enter A Year ");
Scanner Sc=new Scanner(System.in);
int year=Sc.nextInt();

if( (year%100!=0 && year%4==0) || (year%400==0) )
System.out.print("LeapYear:"+year);


else
System.out.print("It is not  LeapYear:"+year);

}

}

About EasyToCode

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.