If they are erroneous return -1 an example call to the


Write a function called day_diff that takes four scalar positive integer inputs, month1, day1, month2, day2. These represents the birthdays of two children who were born in 2015. The function returns a positive integer scalar that is equal to the difference between the ages of the two children in days. Make sure to check that the input values are of the correct types and they represent valid dates. If they are erroneous, return -1. An example call to the function would be >> dd = day_diff(1,30,2,1); which would make dd equal 2. You are not allowed to use the built-in function datenum or datetime.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: If they are erroneous return -1 an example call to the
Reference No:- TGS01586742

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)