These represents the birthdays of two children who were


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, for or while.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: These represents the birthdays of two children who were
Reference No:- TGS01575736

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)