Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1;
t = 1;
assert(isequal(triangle(n),t))
t =
0
t =
1
|
2 | Pass |
n = 3;
t = 6;
assert(isequal(triangle(n),t))
t =
0
t =
1
t =
3
t =
6
|
3 | Pass |
n = 5;
t = 15;
assert(isequal(triangle(n),t))
t =
0
t =
1
t =
3
t =
6
t =
10
t =
15
|
4 | Pass |
n = 30;
t = 465;
assert(isequal(triangle(n),t))
t =
0
t =
1
t =
3
t =
6
t =
10
t =
15
t =
21
t =
28
t =
36
t =
45
t =
55
t =
66
t =
78
t =
91
t =
105
t =
120
t =
136
t =
153
t =
171
t =
190
t =
210
t =
231
t =
253
t =
276
t =
300
t =
325
t =
351
t =
378
t =
406
t =
435
t =
465
|
483 Solvers
Arrange Vector in descending order
4076 Solvers
406 Solvers
5463 Solvers
309 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!