Question: (50) Please write a C program that allows the user to input two year values consecutively and calculate the difference in number of years using

(50) Please write a C program that allows the user to input two year values consecutively and calculate the difference in number of years using a yearsBetween() function. For example, if the user inputs 2003 and then 2010, yearsBetween() should return the value 7. Note that the user may enter year values in any order and yearsBetween() should ALWAYS subtract the smaller value from the larger value. For example: yearsBetween(2003, 2010) should return 7 yearsBetween(2010, 2003) should also return 7

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!