Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 (10 points) Please write a JAVA program named IsLeap Year that prompts the user to enter a positive integer value between 1600 and

image text in transcribed

Problem 2 (10 points) Please write a JAVA program named IsLeap Year that prompts the user to enter a positive integer value between 1600 and 2015 inclusive, that represents a year. As output, the program will display the date entered by the user and a statement indicating whether or not the value entered is that of a leap year. A leap year is defined by the following rules: Rule: If y is divisible by 4, then y is a leap year. Exception to the Rule: If y is also divisible by 100, then y is not a leap year. Exception to the Exception to the Rule: If y is also divisible by 400, then y is a leap year. Sample Input Data: 1999 is not a leap year because 1999 is not divisible by 4. 1624 is a leap year because 1624 is divisible by 4. 1900 is not a leap year because 1900 is divisible by 4 but is also divisible by 100. 2000 is a leap year because 2000 is divisible by 4, 100, and 400

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Find the derivative. f(x) 8 3 4 mix X O 4 x32 4 x32 3 -4x - x2

Answered: 1 week ago

Question

2 What supply is and what affects it.

Answered: 1 week ago