Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
mo = 1;
yr = 2014;
momat = makeCalendar(mo,yr);
momat_correct = [ ...
0 0 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 0];
assert(isequal(momat,momat_correct))
momat =
0 0 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 0
0 0 0 0 0 0 0
momat =
0 0 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 0
|
2 | Pass |
mo = 2;
yr = 2015;
momat = makeCalendar(mo,yr);
momat_correct = [ ...
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28];
assert(isequal(momat,momat_correct))
momat =
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
0 0 0 0 0 0 0
0 0 0 0 0 0 0
momat =
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
0 0 0 0 0 0 0
momat =
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
|
3 | Pass |
mo = 10;
yr = 2010;
momat = makeCalendar(mo,yr);
momat_correct = [ ...
0 0 0 0 0 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 0 0 0 0 0 0];
assert(isequal(momat,momat_correct))
momat =
0 0 0 0 0 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 0 0 0 0 0 0
|
4 | Pass |
mo = 11;
yr = 1972;
momat = makeCalendar(mo,yr);
momat_correct = [0 0 0 1 2 3 4;5 6 7 8 9 10 11;12 13 14 15 16 17 18;19 20 21 22 23 24 25;26 27 28 29 30 0 0];
assert(isequal(momat,momat_correct))
momat =
0 0 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 0 0
0 0 0 0 0 0 0
momat =
0 0 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 0 0
|
848 Solvers
Arrange Vector in descending order
1812 Solvers
Find the sum of the elements in the "second" diagonal
880 Solvers
Similar Triangles - find the height of the tree
156 Solvers
272 Solvers