subject

JAVA Write a program that prompts the user to enter a year and the first three letters of a month name (with the first letter in uppercase) and displays the number of days in the month.

If the input for month is incorrect, display a message as shown in the following sample run.

SAMPLE RUN 1:

Enter a year: 2001
Enter a month: Jan
Jan 2001 has 31 days

SAMPLE RUN 2:

Enter a year: 2016
Enter a month: Feb
Feb 2016 has 29 days

SAMPLE RUN 3:

Enter a year: 2016

Enter a month: jan

jan is not a correct month name

Class Name: Exercise04_17

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 05:20, jaylenmiller437
Which operating system is a version of linux?
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, kevin72836
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
image
Computers and Technology, 24.06.2019 05:30, lolololol21
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
image
Computers and Technology, 24.06.2019 15:00, MilanPatel
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
You know the right answer?
JAVA Write a program that prompts the user to enter a year and the first three letters of a month n...

Questions in other subjects:

Konu
Mathematics, 22.10.2020 19:01