Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1;
area_correct = 25;
tolerance = 1e-12;
assert(abs(triangle_sequence(n)-area_correct)<tolerance)
area =
25
|
2 | Pass |
n = 2;
area_correct = 41;
tolerance = 1e-12;
assert(abs(triangle_sequence(n)-area_correct)<tolerance)
c =
6.4031
area =
41
|
3 | Pass |
n = 3;
area_correct = 66;
tolerance = 1e-12;
assert(abs(triangle_sequence(n)-area_correct)<tolerance)
c =
6.4031
c =
8.1240
area =
66.0000
|
4 | Pass |
n = 50;
area_correct = 439116598409;
tolerance = 1e-3;
assert(abs(triangle_sequence(n)-area_correct)<tolerance)
c =
6.4031
c =
8.1240
c =
10.3441
c =
13.1529
c =
16.7332
c =
21.2838
c =
27.0740
c =
34.4384
c =
43.8064
c =
55.7225
c =
70.8802
c =
90.1610
c =
114.6865
c =
145.8835
c =
185.5667
c =
236.0445
c =
300.2532
c =
381.9280
c =
485.8199
c =
617.9725
c =
786.0732
c =
999.9005
c =
1.2719e+03
c =
1.6179e+03
c =
2.0580e+03
c =
2.6178e+03
c =
3.3299e+03
c =
4.2356e+03
c =
5.3878e+03
c =
6.8534e+03
c =
8.7177e+03
c =
1.1089e+04
c =
1.4106e+04
c =
1.7942e+04
c =
2.2823e+04
c =
2.9032e+04
c =
3.6929e+04
c =
4.6974e+04
c =
5.9752e+04
c =
7.6006e+04
c =
9.6681e+04
c =
1.2298e+05
c =
1.5643e+05
c =
1.9899e+05
c =
2.5311e+05
c =
3.2196e+05
c =
4.0955e+05
c =
5.2095e+05
c =
6.6266e+05
area =
4.3912e+11
|
Maximum running product for a string of numbers
1112 Solvers
1598 Solvers
1365 Solvers
Back to basics 6 - Column Vector
908 Solvers
299 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!