day month year problem

Apr 6 2009 11:40 AM
Hello everybody, I am having a problem to solve the following c# exercise: February can be 29 days if it is during a leap year. Do NOT change the implementation of date_convert. Instead, add additional code in your main so that before you display the output of the method, if the month entered by the user is February, prompt the user for the year, and then use IsLeap to check the year and adjust the output of date_convert accordingly. Write appropriate method calls and statements within your main so that the console session may look as follows: A valid console session may look as follows: Please enter a month: March The number of days in March is 31 Another session may look as follows: Please enter a month: february Please enter a year: 2007 The number of days in February is 28 Another session may look as follows: Please enter a month: february Please enter a year: 2000 The number of days in February is 29 If anybody can help me to solve the problem then i will be very greatfull. Syed

Answers (1)