Problem 45328. leap year

Solution 2129426

Submitted on 15 Feb 2020 by David Hill
  • Size: 15
  • This is the leading solution.
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
n = 1900:2000; assert(isequal( leap_count(n),25))

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

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

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

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

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!