Cody

Problem 45207. Calculate days until Christmas

Solution 3388278

Submitted on 26 Oct 2020 at 7:11
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(daysUntilChristmas(2019,11,19),36))

2   Fail
assert(isequal(daysUntilChristmas(2018,12,28),362))

Assertion failed.

3   Pass
assert(isequal(daysUntilChristmas(2019,01,01),358))

4   Fail
assert(isequal(daysUntilChristmas(2019,12,30),361))

Assertion failed.

Suggested Problems

More from this Author5

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!