Question: PLEASE WRITE IN C# MUST BE ORIGINAL WORK Write a program to read integer values for month and year and print the number of days

PLEASE WRITE IN C#

MUST BE ORIGINAL WORK

Write a program to read integer values for month and year and print the number of days in the month.

For example, 4 2005 (April 2005) should print 30;

2 2004 (February 2004) should print 29

2 1900 (February 1900) should print 28.

A leap year, n, is divisible by 4; however, if n is divisible by 100 then it is a leap year only if it is also divisible by 400.

So 1900 is not a leap year but 2000 is.

The table below shows the number of days in each month

January February March April May June July August September October November December
common year 31 28 31 30 31 30 31 31 30 31 30 31
Leap year 29

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!