Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

write a program to prompt the user for 2 dates consisting of a month and a year and display the number of years and months between these 2 dates the two dates don t have to be in order

To calculate a positive year difference and the corresponding month difference, a. Subtract the earlier year from the later year to get the year difference. b. Subtract the month associated with the earlier year from the month associated with the later year. The month difference can be negative (see examples in the table below). In sample 2, the month difference is negative. The difference, 3 years and -2 months, means it would be 3-year difference if this were 2 months later. A date difference should not contain a negative month difference. A negative can be adjusted by regrouping one-year difference into 12-month difference. 2. To calculate a date difference between two dates that are in the same year, the year difference is always zero. The month difference should be calculated as a non-negative value.

details is at part IV in the file I upload

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"