Test  Status  Code Input and Output 

1  Pass 
h = 20; m=5; n=3;
y_correct = 9;
assert(isequal(catdays(h,m,n),y_correct))
x =
5
x =
2
y =
1
x =
7
x =
4
y =
2
x =
9
x =
6
y =
3
x =
11
x =
8
y =
4
x =
13
x =
10
y =
5
x =
15
x =
12
y =
6
x =
17
x =
14
y =
7
x =
19
x =
16
y =
8
x =
21
y =
9

2  Pass 
h = 15; m=6; n=1;
y_correct = 3;
assert(isequal(catdays(h,m,n),y_correct))
x =
6
x =
5
y =
1
x =
11
x =
10
y =
2
x =
16
y =
3

3  Pass 
h = 25; m=6; n=5;
y_correct = 21;
assert(isequal(catdays(h,m,n),y_correct))
x =
6
x =
1
y =
1
x =
7
x =
2
y =
2
x =
8
x =
3
y =
3
x =
9
x =
4
y =
4
x =
10
x =
5
y =
5
x =
11
x =
6
y =
6
x =
12
x =
7
y =
7
x =
13
x =
8
y =
8
x =
14
x =
9
y =
9
x =
15
x =
10
y =
10
x =
16
x =
11
y =
11
x =
17
x =
12
y =
12
x =
18
x =
13
y =
13
x =
19
x =
14
y =
14
x =
20
x =
15
y =
15
x =
21
x =
16
y =
16
x =
22
x =
17
y =
17
x =
23
x =
18
y =
18
x =
24
x =
19
y =
19
x =
25
x =
20
y =
20
x =
26
y =
21

4  Pass 
h = 22; m=6; n=5;
y_correct = 18;
assert(isequal(catdays(h,m,n),y_correct))
x =
6
x =
1
y =
1
x =
7
x =
2
y =
2
x =
8
x =
3
y =
3
x =
9
x =
4
y =
4
x =
10
x =
5
y =
5
x =
11
x =
6
y =
6
x =
12
x =
7
y =
7
x =
13
x =
8
y =
8
x =
14
x =
9
y =
9
x =
15
x =
10
y =
10
x =
16
x =
11
y =
11
x =
17
x =
12
y =
12
x =
18
x =
13
y =
13
x =
19
x =
14
y =
14
x =
20
x =
15
y =
15
x =
21
x =
16
y =
16
x =
22
x =
17
y =
17
x =
23
y =
18

5  Pass 
h = 31; m=8; n=5;
y_correct = 9;
assert(isequal(catdays(h,m,n),y_correct))
x =
8
x =
3
y =
1
x =
11
x =
6
y =
2
x =
14
x =
9
y =
3
x =
17
x =
12
y =
4
x =
20
x =
15
y =
5
x =
23
x =
18
y =
6
x =
26
x =
21
y =
7
x =
29
x =
24
y =
8
x =
32
y =
9

Determine whether a vector is monotonically increasing
11472 Solvers
2167 Solvers
Find the "ordinary" or Euclidean distance between A and Z
136 Solvers
Permute diagonal and antidiagonal
217 Solvers
Given a 4x4 matrix, swap the two middle columns
497 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!