Cody

Problem 45328. leap year

Solution 3339843

Submitted on 23 Oct 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))

Error in solution: Line: 2 Column: 27 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 2 Column: 27 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 2 Column: 27 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 2 Column: 27 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 2 Column: 27 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Community Treasure Hunt

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

Start Hunting!