Question: in java Chapter 3, Problem 11PE import java. util. scanner: public class MonthDays f public static void main (Stri //create object for scanner Bcanner input

 in java Chapter 3, Problem 11PE import java. util. scanner: public

in java

Chapter 3, Problem 11PE import java. util. scanner: public class MonthDays f public static void main (Stri //create object for scanner Bcanner input new scanner C //Getting month system. out.print ("Enter a to int month input. nextInt 02 int days 0: //Getting year system. out.print ("Enter a ye int year input.nextInt 0 //Pinding the leap year Programming Exercise 3.11 (Find the number of days in a month) Write For example, a program that prompts the user to enter the month and year and displays the number of days in the month. If the user entered month 2 and year 2012, the program should display that February 2812 has 29 days If the user ontered month 3 and year 2015, the program should display that March 2015 has 31 days boolean isleaprear (year % 4 0)II (year 400 0) SAMPLE RUN1: //Finding month days switch (month) Enter a month in the year (e.g., 1 for Jan): 2 Enter a year: 2012 February 2012 has 29 days SAMPLE RUN 2: Enter a month in the year (e.g., 1 for Jan): 4 Enter a year: 2085 April 2005 has 30 days case 1: days 31:break : case 2: if (isLeapYear) days case 3: days 31:break: case 5: days 31:break: case 6: days 30:break: case 7: days 31ibreaki case 8: days 31:break; case 9: days 30; break case 10:days 31:breakr case 11:days 30:break: case 12:days 31:break: SAMPLE RUN 3: Enter a month in the year (e.g, 1 for Jan): 2 Enter a year: 2006 February 2006 has 28 days SAMPLE RUN 4: Enter ia //Display output system. out.println (nonth+ 2016 a year: 2000 February 2000 has 29 days Comment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!