Can You Help Write A Java Program That Prompts The User To Enter The Month And Year? The Program Will Then Display The Number Of Days In The Month. Use Scanner For Input And System, Out, Println For Output?

2

2 Answers

Anonymous Profile
Anonymous answered
Write a program that prompts the user to enter the month and year, and displays the number of days in the month. For example, if the user entered month 2 and year 2000, the program should display that February 2000 has 29 days. If the user entered month 3 and year 2005, the program should display that March 2005 has 31 days.
Anonymous Profile
Anonymous answered
Its very easy, all you have to do is have 12 if statements that says  
if (input = january) {
  System.out.print is 31 days in january")
Do that twice, the only problem is february, which is also easily solved by knowing one leap year and say anything multiple of 4 make it 29

eeeeezzzzzzz

Answer Question

Anonymous