Cody

Problem 45328. leap year

Solution 2827512

Submitted on 13 Aug 2020
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   Fail
n = 1900:2000; assert(isequal( leap_count(n),25))

Assertion failed.

2   Fail
n = 100:2000; assert(isequal( leap_count(n),461))

Assertion failed.

3   Fail
n = 1600:2000; assert(isequal( leap_count(n),98))

Assertion failed.

4   Fail
n = 3000; assert(isequal( leap_count(n),0))

Assertion failed.

5   Fail
n = 377:467; assert(isequal( leap_count(n),22))

Assertion failed.

Suggested Problems

More from this Author149

Community Treasure Hunt

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

Start Hunting!